# Customized Property Definitions

RadPropertyGrid auto-generates its property definitions by default based on the properties of the source object. They are stacked vertically in a standard form layout and depend on the type of each property.

> caption RadPropertyGrid with automatically generated property definitions when bound to a button

![RadPropertyGrid with automatically generated property definitions when bound to a button](https://www.telerik.com/products/wpf/documentation/assets/1f5470d4767c60a6f052c0359ef972b3/radpropertygrid_gettingstarted3.png)

However, sometimes you may decide on customizing or totally changing them. This can be achieved by setting the **AutoGeneratePropertyDefinitions** to **"False"** and defining those you require in the **PropertyDefinitions** collection. For example, instead of using a simple TextBox for editing the **Height** and **Width** properties of a **RadButton**, you may use a **RadNumericUpDown**:

**Example 1: Custom Property Definitions**

```XAML
<Grid>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <telerik:RadButton x:Name="button1" Content="MyButton" Width="150" Height="70" />
    <telerik:RadPropertyGrid Item="{Binding ElementName=button1}" AutoGeneratePropertyDefinitions="False" LabelColumnWidth="100" Grid.Column="1">
        <telerik:RadPropertyGrid.PropertyDefinitions>
            <telerik:PropertyDefinition Binding="{Binding Width}" Description="Displays the Width property of the RadButton" DisplayName="Width">
                <telerik:PropertyDefinition.EditorTemplate>
                    <DataTemplate>
                        <telerik:RadNumericUpDown Value="{Binding Width, Mode=TwoWay}" />
                    </DataTemplate>
                </telerik:PropertyDefinition.EditorTemplate>
            </telerik:PropertyDefinition>
            <telerik:PropertyDefinition Binding="{Binding Height}" Description="Displays the Height property of the RadButton" DisplayName="Height">
                <telerik:PropertyDefinition.EditorTemplate>
                    <DataTemplate>
                        <telerik:RadNumericUpDown Value="{Binding Height, Mode=TwoWay}" />
                    </DataTemplate>
                </telerik:PropertyDefinition.EditorTemplate>
            </telerik:PropertyDefinition>
        </telerik:RadPropertyGrid.PropertyDefinitions>
    </telerik:RadPropertyGrid>
</Grid>
```

Then, your RadPropertyGrid will be displayed as shown in **Figure 2**.

> caption RadPropertyGrid with custom property definitions

![RadPropertyGrid with custom property definitions](https://www.telerik.com/products/wpf/documentation/assets/e587c4aaf5bb2e236f3a8f70b5873952/radpropertygrid_customizedpropertydefinitions.png)

You may also use RadPropertyGrid to edit directly the properties of the object it is bound to. So, once you change the values inside the RadPropertyGrid, the RadButton will be resized.

> caption Resized RadButton

![Resized RadButton](https://www.telerik.com/products/wpf/documentation/assets/3e1f08415c97878867ac5937541133be/radpropertygrid_customizedpropertydefinitions2.png)

## See Also

* [Autogenerated Property Definitions](https://www.telerik.com/products/wpf/documentation/controls/radpropertygrid/getting-started/autogenerated-property-definitions)
* [Nested Properties](https://www.telerik.com/products/wpf/documentation/controls/radpropertygrid/features/nested-properties)
