Description Attribute 对于属性或是事件的描述,当用户选取该属性或事件时,其会显示于属性表下方。
范例:
|
[Description(“The text to display.”)]
ublic string Text{……} |
Category Attribute 对于属性或是事件的分类,当属性表采用分类模式显示时,会以此Attribute作为分类的依据。
范例:
|
[Category(“Layout”)]
Public string Text{……} |
Browsable Attribute 控制属性或事件是否显示于属性表。
范例:
|
[Browsable(false)]
ublic string NoVisible |
EditorBrowsable Attribute 控制属性或事件是否显示于IntelliSense窗口中,表B-1是可能的值。 Never 不显示 Always 显示 Advanced 仅显示于进阶用户模式,进阶者模式可通过Tools|Options|Text Editor|C#中打开
范例:
| [EditorBrowsable(EditorBrowsableState.Never)]
ublic string Text |
DefaultEvent Attribute 指定默认的事件,当用户于组件/控件上双击鼠标时,Editor会建立此事件函数。
范例:
|
[DefaultEvent(“Click”)]
ublic class MyButton |
DefaultProperty Attribute 指定默认的属性
范例:
|
[DefaultProperty(“Text”)]
ublic class MyButton |
ReadOnly Attribute 指定属性是否只读。
范例:
| [ReadOnly(true)]
ublic int MyProperty |
Bindable Attribute 指定属性是否支持Data Binding。
范例:
|
[Bindable(true)]
ublic int MyProperty |