Skip to content

页面选择属性

此特性为活字格V9.0.100.0新增功能

csharp
    public class MyPluginCellType : CellType
    {
        [PageNameProperty]
        public string PageName { get; set; }
    }

在设计器中效果如下

1693547894906-0e703a8c-b9c7-4ee2-ba63-e8b39e200331.png

默认情况下,内建页面是不能被选择的,如果需要选择内建页面,需要设置IncludeBuiltInPage,代码如下

csharp
    public class MyPluginCellType : CellType
    {
        [PageNameProperty(IncludeBuiltInPage = true)]
        public string PageName { get; set; }
    }

注意,标注PageNameProperty的属性类型必须是 string

更新: 2023-11-02 09:47:28
原文: https://www.yuque.com/robert-bh51n/ea8l6c/rd3oqr2kb414is1s