共享点编辑器部分中切换框的控件名称

发布于 2024-11-10 06:11:20 字数 374 浏览 4 评论 0原文

我正在尝试修改我的 Web 部件的 EditorPart 控制器。基本上我想要的是将自定义控件放在一个盒子内,就像标准属性一样,可以在可见和隐藏之间切换。

在此处输入图像描述

我已经用谷歌搜索了一段时间,但似乎找不到答案。

澄清一下:我知道在将 Web 部件属性直接添加到 Web 部件时可以使用 Category 属性来完成此操作,但我已经扩展了 EditorPart 控制器,所以我认为我不能只需将 [Category("Feed settings")] 添加到我正在创建的 TextBox 和 LiteralControls 中(正确吗?)。

I'm trying to modify the EditorPart controller for my web part. Basically what I want is to have my custom controls inside a box like the standard properties that can toggle between visible and hidden.

enter image description here

I've been googling for a while, but I cannot seem to find an answer.

Just to clarify: I know I can use the Category property to accomplish this when adding web part properties directly to the web part, but I've extended the EditorPart controller and so I don't think I can simply add [Category("Feed settings")] to the TextBox and LiteralControls I'm creating (correct?).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

灼疼热情 2024-11-17 06:11:20

对于标准属性,您需要的是使用 Category 属性来标记它:(

[Category("My Category")]
public string FeedQuery { get; set; }

您需要将 System.ComponentModel 命名空间添加到您的类文件中)。

对于编辑器部分来说,事情就没那么简单了。您似乎无法将它们添加到标准类别中。可以将编辑器部分的样式设置为类似于 OOB 面板 如图所示

What you'd need for a standard property is to mark it with the Category attribute:

[Category("My Category")]
public string FeedQuery { get; set; }

(You'll need to add the System.ComponentModel namespace to your class file).

For editor parts it is not so simple. It appears that you can't add them to the standard categories. It is possible to style the editor part to resemble the OOB panels as shown here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文