| 永远的发哥 |
 |
| 等级:社区游侠 |
| 权限:普通用户 |
| 积分:37 |
| 金钱:659 |
| 声望:51 |
| 经验:51 |
| 发帖数:175 |
| 注册:2008年2月15日 |
|
|
|
|
Description Attribute 对于属性或是事件的描述,当用户选取该属性或事件时,其会显示于属性表下方。 范例:
| [Description(“The text to display.”)]
Public string Text{……} | Category Attribute 对于属性或是事件的分类,当属性表采用分类模式显示时,会以此Attribute作为分类的依据。 范例:
| [Category(“Layout”)]
Public string Text{……} | Browsable Attribute 控制属性或事件是否显示于属性表。 范例:
| [Browsable(false)]
Public string NoVisible | EditorBrowsable Attribute 控制属性或事件是否显示于IntelliSense窗口中,表B-1是可能的值。 Never 不显示 Always 显示 Advanced 仅显示于进阶用户模式,进阶者模式可通过Tools|Options|Text Editor|C#中打开
范例:
| [EditorBrowsable(EditorBrowsableState.Never)]
Public string Text | DefaultEvent Attribute 指定默认的事件,当用户于组件/控件上双击鼠标时,Editor会建立此事件函数。 范例:
| [DefaultEvent(“Click”)]
Public class MyButton | DefaultProperty Attribute 指定默认的属性 范例:
| [DefaultProperty(“Text”)]
Public class MyButton | ReadOnly Attribute 指定属性是否只读。 范例:
| [ReadOnly(true)]
Public int MyProperty | Bindable Attribute 指定属性是否支持Data Binding。 范例:
| [Bindable(true)]
Public int MyProperty |
|
|
|
|
|
|