This project has moved. For the latest updates, please go here.

[PropertyGrid] Unable to edit attributes *structs* (like Thickness) with ExpandableObject

Jan 25, 2013 at 11:50 AM

Hello everybody.

I'm struggling a lot trying to make a custom editor for Thickness. A Thickness is a struct, so making changes to its inner values have no effect. No tracking for them

I tried to show a Padding like Visual Studio: a composition of 4 values that could be changed independently.

I find myself unable to do it. Declaring Padding with the ExpandableObjectAttribute does show the composing values, but modifying them doesn't have any effect.

Feb 5, 2013 at 1:02 PM
This is because Thickness is a value type (eg. a "struct")
Take a look at the "Binding to Struct" sample under "PropertyGrid".