WebPartStorageAttribute.ControlledExport 属性

获取或设置一个值,指示是否将该属性标记为受控的属性。

命名空间:  Microsoft.SharePoint.WebPartPages
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
Public Property ControlledExport As Boolean
    Get
    Set
用法
Dim instance As WebPartStorageAttribute
Dim value As Boolean

value = instance.ControlledExport

instance.ControlledExport = value
public bool ControlledExport { get; set; }

属性值

类型:System.Boolean
true如果属性标记为控制导出 ;否则为false。

备注

如果ExportControlledProperties属性为true,Web 部件基础结构将允许与 Web 部件页的用户在导出已标记为的属性的个人视图中打开控制通过 Web 部件开发的属性。如果false,基础结构将不导出的值控制属性。

Web 部件开发人员可以通过将WebPartStorageAttribute属性的ControlledExport属性设置为true作为受控属性标记属性。在运行时, WebPartExportControlledProperties属性可以用于确定是否可以导出受控属性的值。

示例

下面的代码示例演示如何将WebPartStorageAttribute标记属性作为受控属性的ControlledExport属性设置。

<WebPartStorage(Storage.Personal, ControlledExport := True), DefaultValue(0), Browsable(True), Bindable(True), XmlElement("Controlled_PersonalProperty", [Namespace] := "mycompany.com:personalproperty")>  _
 Public Property PersonalInteger() As Integer
    Get
       Return perUser
    End Get
    Set
       perUser = value
    End Set
 End Property
[WebPartStorage (Storage.Personal, ControlledExport=true)]
[DefaultValue (0)]
[Browsable (true)]
[Bindable (true)]
[XmlElement("Controlled_PersonalProperty", Namespace="mycompany.com:personalproperty")]
public int PersonalInteger 
{
    get 
    {
        return perUser;
    }
    set 
    {
        perUser = value;
    }
}

另请参阅

引用

WebPartStorageAttribute 类

WebPartStorageAttribute 成员

Microsoft.SharePoint.WebPartPages 命名空间