Updated PropertyGrid (markdown)

master
DianeXceed 9 years ago
parent
commit
d0aa885a4b
  1. 7
      PropertyGrid.md

7
PropertyGrid.md

@ -30,7 +30,6 @@ By default the propertyGrid will autogenerate all the properties for a given obj
``` ```
### Custom Editors ### Custom Editors
By default the PropertyGrid comes with 19 built-in editors: By default the PropertyGrid comes with 19 built-in editors:
* ByteUpDownEditor * ByteUpDownEditor
* CheckBoxEditor * CheckBoxEditor
@ -54,7 +53,6 @@ By default the PropertyGrid comes with 19 built-in editors:
* TimeSpanEditor * TimeSpanEditor
### Custom Editors with DataTemplates ### Custom Editors with DataTemplates
You can override the default editors with your own custom editors with a DataTemplate. Simply define an EditorDefinition that either targets a Type, property name, or both and set the EditorDefinition.EditorTemplate to an instance of a DataTemplate. Be sure to bind your custom editor to the bound property item's Value property. You can override the default editors with your own custom editors with a DataTemplate. Simply define an EditorDefinition that either targets a Type, property name, or both and set the EditorDefinition.EditorTemplate to an instance of a DataTemplate. Be sure to bind your custom editor to the bound property item's Value property.
[[PropertyGrid_customeditor_datatemplates.jpg]] [[PropertyGrid_customeditor_datatemplates.jpg]]
@ -141,7 +139,6 @@ You can override the default editors with your own custom editors with a DataTem
``` ```
### Custom Editors with Attributes ### Custom Editors with Attributes
You can supply editors for a property by using the System.ComponentModel.EditorAttribute. In order to provide an editor with an attribute, the editor MUST implement the ITypeEditor interface. Your editor can be a simple class or a complex UserControl. You can supply editors for a property by using the System.ComponentModel.EditorAttribute. In order to provide an editor with an attribute, the editor MUST implement the ITypeEditor interface. Your editor can be a simple class or a complex UserControl.
[[PropertyGrid_customeditor_attributes.jpg]] [[PropertyGrid_customeditor_attributes.jpg]]
@ -279,7 +276,7 @@ The custom ItemsSource class:
``` ```
### Expandable Properties ### Expandable Properties
Sometimes it is neccessary to show the properties of a complex object. The PropertyGrid supports this scenario and allows you to drill down into a property's heirarchy. To enable this behavior you must decorate your property with the ExpandableObject attribute. Sometimes it is necessary to show the properties of a complex object. The PropertyGrid supports this scenario and allows you to drill down into a property's hierarchy. To enable this behavior you must decorate your property with the ExpandableObject attribute.
[[PropertyGrid_expandableobject.jpg]] [[PropertyGrid_expandableobject.jpg]]
@ -302,7 +299,7 @@ Sometimes it is neccessary to show the properties of a complex object. The Prop
| Property | Description | | Property | Description |
| --- | --- | | --- | --- |
| AdvancedOptionsMenu | Gets or sets the contextual menu to use when the advanced menu button is clicked. | | AdvancedOptionsMenu | Gets or sets the contextual menu to use when the advanced menu button is clicked. |
| AutoGenerateProperties | Get or sets if the propertyGrid should generate all properties for a given object. If False you must provide PropertyDefinitions for the properties you want to generate. | | AutoGenerateProperties | Get or sets if the PropertyGrid should generate all properties for a given object. If False you must provide PropertyDefinitions for the properties you want to generate. |
| EditorDefinitions| Gets or sets a collection of custom editors to use in place of the default editors. (Breaking change as of v1.6.0: previously was CustomTypeEditors.) | | EditorDefinitions| Gets or sets a collection of custom editors to use in place of the default editors. (Breaking change as of v1.6.0: previously was CustomTypeEditors.) |
| Filter | Gets or sets the filter used to filter the visible properties in the PropertyGrid. | | Filter | Gets or sets the filter used to filter the visible properties in the PropertyGrid. |
| FilterWatermark | Gets or sets the watermark used in the filter field. | | FilterWatermark | Gets or sets the watermark used in the filter field. |

Loading…
Cancel
Save