PropertyGrid: Showing Collections
Besides basic types, PropertyGrid also has a good support with collection classes. In my editor, I created a wrapper class with CLI/C++ to expose C++ material as C# property. A collection of wrapper materials can be accessed in PropertyGrid.
property List<ManagedMaterial^>^ Materials
{ List<ManagedMaterial^>^ get(); }
Within the collection, each element’s properties are shown on the right. As long as the accessors and mutators are properly set, this field should come up automatically.
If you want to customize the name of object in the collection editor’s list, override ToString() function of the class and return the name you want.














