Common Attributes for Properties and Events

it2022-05-09  22

Attribute Applied To Description

BrowsableAttribute

Properties and events

Specifies whether a property or an event should be displayed in the property browser.

CategoryAttribute

Properties and events

Specifies the name of the category in which to group a property or event. When categories are used, component properties and events can be displayed in logical groupings in the property browser.

DescriptionAttribute

Properties and events

Defines a small block of text to be displayed at the bottom of the property browser when the user selects a property or event.

BindableAttribute

Properties

Specifies whether a property is interesting to bind to.

DefaultPropertyAttribute

Properties

(Insert this attribute before the class declaration.)

Specifies the default property for the component. This property is selected in the property browser when a user clicks on the control.

DefaultValueAttribute

Properties

Sets a simple default value for a property.

EditorAttribute

Properties

Specifies the editor to use for editing (changing) a property in a visual designer.

LocalizableAttribute

Properties

Specifies that a property can be localized. Any properties that have this attribute are automatically persisted into the resources file when a user chooses to localize a form.

DesignerSerializationVisibilityAttribute

Properties

Specifies whether (and how) a property displayed in the property browser should be persisted into code.

TypeConverterAttribute

Properties

Specifies the type converter to use for converting the type of the property to another data type.

DefaultEventAttribute

Events

(Insert this attribute before the class declaration.)

Specifies the default event for the component. This is the event that is selected in the property browser when a user clicks on the component.

转载于:https://www.cnblogs.com/nanshouyong326/archive/2008/10/10/1308289.html

相关资源:数据结构—成绩单生成器

最新回复(0)