- System.ComponentModel.Browsable 是否在属性面板中显示属性
[System.ComponentModel.Browsable(false)]
public string Discription {get; set;}
- System.ComponentModel.DisplayName 修改属性的显示名称。
[System.ComponentModel.DisplayName("VS2017 Discription")]
public string Discription {get; set;}
- System.ComponentModel.Discription 用于在属性面板底部的提示信息
[System.ComponentModel.Discription("VS2017 Discription")]
public string Discription {get; set;}
- System.ComponentModel.Categrory 分组信息,默认显示在Misc分组中
[System.ComponentModel.Category("Custom")]
public string Discription {get; set;}
- System.ComponentModel.Default 属性默认值。拥有该属性,VS自动创建控件时不会自动添加创建该属性的代码
[System.ComponentModel.Default("Custom Discription")]
public string Discription {get; set;}
- System.ComponentModel.AmbientValue 周围属性,例如前景色、背景色和字体。除非通过属性窗口显示设置,否则这些属性不是继承自他们的基类,而是继承自父控件。周围属性的较宽泛的定义 时从另一个数据源中获得其值的属性。拥有该属性,VS自动创建控件时不会自动添加创建该属性的代码