Skip to content

属性分组

有时,会把单元格的一组相关的属性添加一个分组头,使得属性面板看起来更有条理。

这个效果可以通过给属性标注 CategoryHeaderAttribute 来实现

示例代码

csharp
    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; }
    }

设计器中的效果

1669996255027-d4369e1f-e4bd-4a94-97fa-fb28319adc76.png

更新: 2022-12-02 23:50:58
原文: https://www.yuque.com/robert-bh51n/ea8l6c/gs0vl34corg7t6ap