You can use attributes to customize the display and content of items displayed in the property grid. The C1PropertyGrid control supports several attributes, including the following:
- Display.Name: sets the text label displayed for each property.
- Display.Order: used to specify the order in which properties are shown (when using custom sort).
- Display.Description: used to set a description for the property; this description will be shown at the bottom of the C1PropertyGrid, when the property that is being edited gets the focus.
- DefaultValue: used to set a default value for the property; the default value will be applied when the property has no other value (it was not initialized or has a null value) or when the Reset button is pressed.
- Editor: used to set a custom editor for the current property (override the editor assigned by default).
- MaximumValue: used to set a maximum value for a property, the PropertyAttribute.MaximumValue will be taken into consideration only for those editors where it makes sense (the numeric editor, for example).
- MinimumValue: used to set a minimum value for a property, the PropertyAttribute.MinimumValue will be taken into consideration only for those editors where it makes sense (the numeric editor, for example).
- Browsable: If set to false, the property will not be shown in the C1PropertyGrid.
- Category: used to set the category in which the property will be shown.
- PropertyBinding: used to override the default binding between the property and its editor; this is useful, for example, if you want to set your own converter or if you don’t want the default validation for properties.
- DisplayFormat: used to specify a format to show the property value, the DisplayFormat will be taken into consideration only for those editors where it makes sense (the numeric editor, for example).
- ReadOnly: if set to True, the property will be shown in the C1PropertyGrid but it won’t be possible to change its value.