January 2002
Intermediate to advanced
288 pages
5h 48m
English
Attributesplay a large role in every facet of .NET, from XML serialization to control development. The PropertyGrid relies heavily on custom attributes for object properties that it uses to determine the default value, determine whether the property is browsable, and make many other choices. Attributes are used to control the PropertyGrid and the code serializer, and for defining the UITypeEditor for a property, the designer for a component, and the category for a designer, among other things. The common case for attributes deals with interaction with the PropertyGrid and specifying the category, description, browsable, and type converter attributes. Figure 5.3 shows how attributes are used to control the PropertyGrid.