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

Cannot use "Instance" to reference "SelectedObject" in the property grid in 1.8

Nov 19, 2012 at 2:25 PM


I just upgraded the toolkit to 1.8 and found the previous implementation is not working now. I checked the source code,  the assignment to "Instance" in the constructor of PropertyItem was removed.

How can I reference the SelectedObject in the XAML now?

Thanks in advance! 

Nov 20, 2012 at 1:43 AM

This issue has been created based on this discussion:


Meanwhile, if your property is not a "sub-property" of an expanded one, this could do the job to return the "instance"

{Binding SelectedObject, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type xctk:PropertyGrid}}}

If your property is a "sub-property":

{Binding Value, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type xctk:PropertyItem}}}
Dec 14, 2012 at 3:57 PM

this will be fixed in v1.9. "Instance" property will be initialized