
I am trying to use the your WPF property grid with a custom class of which has a member that is a dictionary<string, string>. However, dictionaries do not implement the INotify interface and your component does not allow me to add new items to the dictionary at runtime. My work around is to create a new diaglog where I can add new key value pairs to the dictionary. If I add a break point I can see the new entry in the dictionary, but it doesn't get reflected in the property grid.
I have tried to create a new class that impliments the INotify and IDictionary interface to get the property grid to update, however, when I do this, the propery doesn't expand properly. All I see is a count of the number of element in my dictionary.
I assume I am missing some property that the property grid requires to expand properly.
So my question is:
Is there a way that I can trigger the property grid to update the dictionary property after I add a new key value pair?
Is there already an established way to manipulate dictionaries using your property grid that I am missing? If so could you provide an example?
I essentially need something to hold <string, string> pairs that I can add, remove, or update from the grid.
How does the property grid enable the property to be expanded? The documentation says that it needs to implement IDictionary, ICollection, or IList interfaces, which my observableDictionary class does, but it doesn't display propery like it does if I directly tie the dataobject to the dictionary.
Thank you
Jamie
Jamie Godbout