Common Properties for custom controls

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.