WebPart.AllowRemove 属性
请注意:此 API 现在已过时。
获取或设置是否通过控制是否可以向false设置IsIncluded属性,可以从 Web 部件页删除 Web 部件。
命名空间: Microsoft.SharePoint.WebPartPages
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
<ObsoleteAttribute("Use AllowClose instead.")> _
<WebPartStorageAttribute(Storage.Shared)> _
Public Property AllowRemove As Boolean
Get
Set
用法
Dim instance As WebPart
Dim value As Boolean
value = instance.AllowRemove
instance.AllowRemove = value
[ObsoleteAttribute("Use AllowClose instead.")]
[WebPartStorageAttribute(Storage.Shared)]
public bool AllowRemove { get; set; }
属性值
类型:System.Boolean
true可以删除 Web 部件 ; 如果否则为false。默认值是true。
备注
此属性不能由单个用户进行个性化设置。WebPartStorageAttribute其值为Storage.Shared,它指定的属性将存储的所有用户的相同值。只有具有写网页右侧的用户可以设置该属性。以编程方式,可以将或通过基于 Web 的用户界面,或使用SharePoint Foundation的共享视图中的 Web 部件任务窗格可以将设置-兼容的 HTML 编辑器如SharePoint Designer。