Data-driven properties?

Feb 22, 2011 at 2:41 PM

I have a set of properties that are just name/value pairs.  I noticed that internally 'PropertyViewModel' is used to represent a property.  Is there any easy way for me to create PropertyViewModel objects myself and inject them into the property editor?

Feb 22, 2011 at 3:29 PM

I think this can be solved with a TypeDescriptorProvider and ICustomTypeDescriptors for your class!

Feb 23, 2011 at 9:58 AM

For my class?  What do you mean?  I don't have a class.  I have a collection of name/value pairs that I'd like to convert to the collection of PropertyViewModel objects that is held within the property grid and was wondering if there is any easy way to do this.

Feb 23, 2011 at 8:38 PM

see the new CustomTypeDescriptor demo on how to wrap a Dictionary for use in the property editor!