First, BrowsableAttribute
Specifies whether a property or event is displayed propertygrid the Properties window, which is displayed by default
Second, Displaynameattribute
Specify a property or the display name of the event in the Properties window PropertyGrid
Third, CategoryAttribute
Specifies the category in which a property or event belongs in the sort order mode of the Properties window PropertyGrid
Iv. DescriptionAttribute
Specifies a property or description of the event in the Properties window PropertyGrid
1 Public Partial classMyusercontrol:usercontrol2 {3 PublicMyUserControl ()4 {5 InitializeComponent ();6 }7 8 Private string_ID1 =string. Empty;9 Ten[Browsable (true)] One[DisplayName ("numbering")] A[Category ("Custom")] -[Description ("Control Unique Number")] - Public stringID1 the { - Set - { -_ID1 =value; + } - Get + { A return_id1; at } - } -}View Code
Common Properties for custom controls