📄 wroxbuttonconverter.cs
字号:
using System;
using System.Drawing.Design;
using System.ComponentModel;
using System.ComponentModel.Design;
namespace WroxDesign.Design
{
public class WroxButtonConverter : TypeConverter
{
public WroxButtonConverter()
{
}
public override PropertyDescriptorCollection GetProperties(
ITypeDescriptorContext context, object value,
Attribute[] attributes)
{
//This is the default behavior
// return TypeDescriptor.GetProperties(context.Instance,
// new Attribute[] { new BrowsableAttribute(true) });
//If we are outside the host designer, we are in a custom editor
if (context.Container == null)
return TypeDescriptor.GetProperties(context.Instance,
new Attribute[] { new ToolBarEditableAttribute() });
//Otherwise, return the solicited members
return TypeDescriptor.GetProperties(context.Instance, attributes);
}
public override bool GetPropertiesSupported(
ITypeDescriptorContext context)
{
return true;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -