Skip to content

页面选择属性

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

csharp
    public class MyPluginCommand : Command
    {
        [PageNameProperty]
        public string PageName { get; set; }
    }

在设计器中效果如下

1693550276087-74fbc91f-e77e-4108-9f64-97486599fbb2.png

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

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

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

更新: 2023-11-02 09:48:16
原文: https://www.yuque.com/robert-bh51n/ea8l6c/bvmm8kd9tsdp096s