I’m trying to build a quick administrative interface using the built in Windows.Forms PropertyGrid . I managed to decorate my data classes with the appropriate attributes (ExpandableObjectConverter etc.) and all seems to work fine.
There is a use case I’m not figuring out: When i have values set on complex properties the expand button appears and i can edit the content but when i have a null value there seems to be no way to create a new instance of the desired type.
So a solution to this would be of great help. Added bonus if someone knows of a way to present a drop-down to the user of what types it can create from a list of possible derived values.
This is not so complicated, here is a sample code that does this kind of thing: