Attributes OverviewAttributes provide a powerful method of associating metadata with code. Grooper recognizes many attributes that can provide various functionality, as described below.
Attributes overview (Visual Basic)
- DisplayName: Overrides the default display name of a method or property. By default, Grooper will use the method or property name as the display name. (Grooper will insert spaces before capitalized letters. For example, a property named "FileStore" would end up with a display name of "File Store".) Explicitly specifying the display name can be useful in cases where you want to override the default display name: for example, using the display name attribute to display "SQL Database" instead of "Sql Database".
- DV (default value): Specifies the default value of a field or property.
- DataContract: Specifies that the type defines a data contract and is serializeable. See Properties for more information.
- DataMember: Specifies that this is a member of a data contract and is serializeable. See Properties for more information.
- EmitDefaultValue: Specifies whether to serialize the default value for the field or property being serialized.
- IconResource: Specifies the name of an image resource which should be used as the icon for the object.
- IconStyle: Optional attribute that can overlay the provided icon onto a folder or overlay a "modifier" icon onto the provided icon. In the example below, the Lightning IconStyle attribute overlays a lightning bolt on the standard "database" icon resource.
- Category: Specifying a category will create titled groups in the property grid. Any properties with equivalently named categories will be grouped under that category name. For example:
- TypeConverter: Provides a way of converting types of values to other types, as well as for accessing standard values and subproperties. See Property Grid Editors and Type Converters for more information.
- UI (Editor): Used to design value editors that can provide a user interface (UI) for representing and editing the values of Grooper objects. See Property Grid Editors and Type Converters for more information.
- AppliesTo: Class attribute that includes a public Type property, indicating an exclusive type to which the class applies.
- Viewable: The viewable attribute is required for properties that will be displayed to the user. Developed to allow for the filtering of object collections, based on type application.
- Required: The required attribute causes the property to generate a validation error if the property is not set.
See Also:Visual Studio Integration
Property Grid Editors and Type Converters