當設置不叫我有一個包含在屬性網格我想顯示集合屬性和編輯類:編輯收集
[EditorAttribute(typeof(System.ComponentModel.Design.CollectionEditor), typeof(System.Drawing.Design.UITypeEditor))]
public List<SomeType> Textures
{
get
{
return m_collection;
}
set
{
m_collection = value;
}
}
然而,當我嘗試用CollectionEditor
編輯此集合,set
從不叫;這是爲什麼,我該如何解決?
我也想換我List<SomeType>
在我自己的收藏如下所述:
http://www.codeproject.com/KB/tabs/propertygridcollection.aspx
但無論Add
,也不Remove
當我添加和刪除在CollectionEditor
項目被調用。
好問題,突出了一個常見的誤解。 – annakata 2010-11-10 13:54:01
很樂意幫忙;) – 2010-11-10 13:55:09