Xceed Property Grid:集合编辑器没有以适当的方式扩展

时间:2015-07-17 13:35:21

标签: c# wpf propertygrid xceed collectioneditor

我使用过Xceed Property Grid。我已经使用了Xceed的Collection Editor来获取此Property Grid中的集合。

[Editor(typeof(CustomCollectionEditor), typeof(CustomCollectionEditor))]
[Serializable]
public class Variable
{
//Properties in Class
}

此处自定义集合编辑器源自Xceed集合编辑器。但没有任何东西被覆盖。它只是一个包装类。

Xceed网站告诉以下流程展开: " PropertyGrid支持这种情况,并允许您深入查看属性的层次结构。要启用此行为,必须使用ExpandableObject属性"

装饰属性

所以我在我的财产中使用它:

[ExpandableObject]
public List<Variable> GlobalVariableList
{
  get { return _varlist; }
  set { _varlist = value; }
}

但只有“属性的计数”才会显示在“展开此项”中。而不是财产名称和价值。

1 个答案:

答案 0 :(得分:0)

我认为你的customcollectioneditor需要在集合上而不是项目。

相关问题