In This Article

Getting Started

It's very easy to get up and running with the PropertyGrid control. In fact, setting a single property is often enough to start.

PropertyGrid is extremely customizable and allows you to alter everything from sorting, to filtering, to even the properties that are allowed to display. Be sure to read through this and other documentation topics to learn all about the advanced capabilities property grid supports.

The various Actipro Editors edit box and MaskedTextBox controls can be quickly integrated with a property grid too. These editors help provide enhanced editing features for certain .NET data types. See the Editors/PropertyGrid Interoperability topic for more information.

Displaying Properties of a Data Object

This code shows the base XAML that creates a simple PropertyGrid used to modify the properties of a .NET object, which is the most common usage scenario:

<grids:PropertyGrid DataObject="{Binding YourVMProperty}" />

The PropertyGrid.DataObject property allows for a single data object's properties to be displayed in the control. If multiple data objects need their common properties displayed, bind to the DataObjects property instead.

Note

There are other ways to populate property items, such as explicitly defining them, all of which are described in the Data Models and Factories topic.

Read-Only Display

While most property grid usage scenarios involve wanting end users to be able to alter property values, the property grid is also great for displaying property values in a read-only fashion.

Screenshot

The PropertyGrid control in read-only mode

Set the PropertyGrid.IsReadOnly property to true to prevent any values from being changed.