# Using SelectedObject Property

## Content



The [C1PropertyGrid.SelectedObject](/componentone/api/wpf/online-extended/dotnet-framework-api/C1.WPF.Extended.4.6.2/C1.WPF.Extended.C1PropertyGrid.SelectedObject.html) property determines the object for which the [C1PropertyGrid](/componentone/api/wpf/online-extended/dotnet-framework-api/C1.WPF.Extended.4.6.2/C1.WPF.Extended.C1PropertyGrid.html) control displays properties to edit. You can set the **SelectedObject** property to any object. For example, you can connect the **C1PropertyGrid** control to a control as in the **PropertyGrid for WPF Quick Start** or you can bind the control to a class as in the **Binding C1PropertyGrid to a Class** topic.

In XAML, you would use a binding statement to connect the **C1PropertyGrid** control to an object. For example, the following **C1PropertyGrid** control is linked to a button object:

```xml
<c1:C1PropertyGrid Margin="244,152,186,168" SelectedObject="{Binding ElementName=button, Mode=OneWay}"/>
```

You can also set the **SelectedObject** property in Design view in Blend by selecting the square **Advanced Properties** icon next to the **SelectedObject** item in the Properties window and selecting **Data Binding**. The **Create Data Binding** dialog box will appear allowing you to choose an object to bind to.