I have a class containing a collection property which I want to display and edit in a property grid:
[EditorAttribute(typeof(System.ComponentModel.Design.CollectionEditor), typeof(System.Drawing.Design.UITypeEditor))]
public List<SomeType> Textures
{
get
{
return m_collection;
}
set
{
m_collection = value;
}
}
However, when I try to edit this collection with the CollectionEditor
, set
is never called; why is this and how can I fix it?
I also tried to wrap my List<SomeType>
in my own collection as described here:
http://www.codeproject.com/KB/tabs/propertygridcollection.aspx
But neither Add
, nor Remove
is being called when I add and remove items in the CollectionEditor
.