WebPart.ExportControlledProperties 属性
请注意:此 API 现在已过时。
获取或设置一个值,该值指示是否可以被标记为受控制的属性由 Web 部件开发人员的 Web 部件的属性及其值在个人视图中导出。
命名空间: Microsoft.SharePoint.WebPartPages
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
<ObsoleteAttribute("Use ExportMode instead.")> _
<WebPartStorageAttribute(Storage.Shared)> _
Public Property ExportControlledProperties As Boolean
Get
Set
用法
Dim instance As WebPart
Dim value As Boolean
value = instance.ExportControlledProperties
instance.ExportControlledProperties = value
[ObsoleteAttribute("Use ExportMode instead.")]
[WebPartStorageAttribute(Storage.Shared)]
public bool ExportControlledProperties { get; set; }
属性值
类型:System.Boolean
true如果属性标记为可以个性化模式 ; 中单个用户导出受控的属性否则为false。默认值是false。
备注
如果ExportControlledProperties属性为true,Web 部件基础结构将允许用户与 Web 部件页在个人视图中打开导出属性标记为由 Web 部件开发人员的控制属性。如果false,基础结构不导出受控属性的值。
Web 部件开发人员可以通过将属性的WebPartStorageAttribute类的ControlledExport属性设置为true作为受控属性标记属性。
此属性不能由单个用户进行个性化设置。WebPartStorageAttribute其值为Storage.Shared,用于指定属性存储的所有用户的相同值。只有具有写网页右侧的用户可以设置该属性。以编程方式,可以将或通过基于 Web 的用户界面,或使用SharePoint Foundation的共享视图中的 Web 部件任务窗格可以将设置 – 兼容的 HTML 编辑器如SharePoint Designer。
示例
Overloads Protected Overrides Sub RenderWebPart(output As HtmlTextWriter)
' Check to see if properties marked for controlled export can be exported.
If Me.ExportControlledProperties = True Then
output.Write("Properties marked for controlled export can be exported in personal view")
Else
output.Write("Controlled export properties can only be exported in shared view")
End If
End Sub
protected override void RenderWebPart (HtmlTextWriter output)
{
// Check to see if properties marked for controlled export can be exported.
if (this.ExportControlledProperties == true)
{
output.Write ("Properties marked for controlled export can be exported in personal view");
}
else
{
output.Write ("Controlled export properties can only be exported in shared view");
}
}