ComponentOne Extended Library for WPF and Silverlight
Generating Property Methods Automatically
PropertyGrid > PropertyGrid Features > Generating Property Methods Automatically

By default when you set the C1PropertyGrid.SelectedObject property to bind to an object, the members listed in the C1PropertyGrid control will be automatically generated. This is because the C1PropertyGrid.AutoGenerateProperties property is set to True by default. You can set the SelectedObject property to False if you do not want properties to be automatically generated. You might do so, for example, if you want only a few properties to be editable or you want to customize the way properties appear in the C1PropertyGrid window.

While properties are visible by default, however, methods are not. By default the AutoGenerateMethods property is set to False and methods are not automatically displayed. If you choose, you can automatically generate methods by setting the AutoGenerateMethods property to True.

Sorting Members in C1PropertyGrid

By default properties and methods are listed alphabetically in the C1PropertyGrid control, similar to the Alphabetic view in the Visual Studio Properties window. However, you can customize the way members are listed by setting the C1PropertyGrid.PropertySort property. The C1PropertyGrid control can sort the properties in any of the following ways:

 

Set the C1PropertyGrid.PropertySort property to one of the above options to customize the way the property grid is sorted.