2014-03-03 47 views

回答

1

您的集合編輯器只會顯示某種類型的對象的集合。在這種情況下,它看起來不像是將Editor屬性添加到集合,而是添加到單個對象。

見下面我的代碼:

public class Definition { 
    public string SomeProperty { get; set; } 
} 

public class Definitions : List<Definition> { 
} 

現在,您將能夠在CollectionEditor應用於定義:

[Editor(typeof(CollectionEditor), typeof(CollectionEditor))] 
public Definitions DefTypes { get; set; } 

而且它會彈出CollectionEditor在「定義中定義的屬性'

+0

Doh!多麼悲傷... – Tar

相關問題