Sharepoint 自定义 Web 部件属性未显示在工具箱中 [英] Sharepoint custom web part property does not show up in the toolbox

查看:57
本文介绍了Sharepoint 自定义 Web 部件属性未显示在工具箱中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我定义了一个布尔属性如下:

I have defined a boolean property as follows:

 [Browsable(true), Category("Display"), DefaultValue(false),
  WebPartStorage(Storage.Shared), FriendlyName("Obey Workflow"),
  Description("")]
  public bool ObeyWorkflow { get; set; }

我希望它在 webpart 的属性工具箱中呈现为一个复选框,但是它没有显示出来.我的 Web 部件派生自 Sharepoint WebPart 基类.

I'm expecting it to render as a checkbox in the webpart's properties toolbox, however it doesn't show up. My web part is derived from the Sharepoint WebPart base class.

推荐答案

您走对了.你只需要使用不同的属性.

You are on the right track. You just need to use different attributes.

[Personalizable(PersonalizationScope.Shared)]
[WebBrowsable(true)]
[Category("Display")]
[WebDisplayName("Obey Workflow")]  
[Description("")]  
public bool ObeyWorkflow { get; set; }

这篇关于Sharepoint 自定义 Web 部件属性未显示在工具箱中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆