This project has moved and is read-only. For the latest updates, please go here.

PropertyGrid only displays property Length and no other properties

Feb 1 at 3:03 PM

I have a PropertyGrid whose SelectedObject is set to toolBox2:
<xctk:PropertyGrid x:Name="_propertyGrid" Margin="0"
AutoGenerateProperties="True" SelectedObject="toolBox2">

and a TextBlock
<TextBlock x:Name="toolBox2" Text="Property Window 2"/>

When I run this all I'm getting is
Length 8

I believe that is the length of the name "toolBox2".

The question is how can I set SelectedObject to the TextBlock object?

Many thanks
Feb 1 at 4:31 PM

You need to set a binding to your TextBlock :
    <TextBlock x:Name="toolBox2"
               Text="Property Window 2" />

    <xctk:PropertyGrid x:Name="_propertyGrid"
                       SelectedObject="{Binding ElementName=toolBox2}"
Get more controls, features, updates and technical support with Xceed Toolkit Plus for WPF