[]
有时,会把单元格的一组相关的属性添加一个分组头,使得属性面板看起来更有条理。
这个效果可以通过给属性标注 CategoryHeaderAttribute 来实现。
示例代码:
public class MyPluginCellType : CellType
{
[CategoryHeader("分类1")]
public bool Property1 { get; set; }
public bool Property2 { get; set; }
[CategoryHeader("分类2")]
public bool Property3 { get; set; }
public bool Property4 { get; set; }
public bool Property5 { get; set; }
}
设计器中的效果: