WebPart.AllowZoneChange 属性
获取或设置是否 Web 部件可以通过控制是否可以更改ZoneID属性移至另一个区域。
命名空间: Microsoft.SharePoint.WebPartPages
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
<WebPartStorageAttribute(Storage.Shared)> _
Public Overrides Property AllowZoneChange As Boolean
Get
Set
用法
Dim instance As WebPart
Dim value As Boolean
value = instance.AllowZoneChange
instance.AllowZoneChange = value
[WebPartStorageAttribute(Storage.Shared)]
public override bool AllowZoneChange { get; set; }
属性值
类型:System.Boolean
true可以更改 Web 部件的ZoneID属性 ; 如果否则为false。默认值是true。
备注
如果 Web 部件的ZoneID属性变为无效, AllowZoneChange属性自动设置为true。例如,这会发生时将删除原来包含 Web 部件的 Web 部件区域,或区域的ID属性更改时发生。
此属性不能由单个用户进行个性化设置。WebPartStorageAttribute其值为Storage.Shared,它指定的属性将存储的所有用户的相同值。只有具有写网页右侧的用户可以设置该属性。以编程方式,可以将或通过基于 Web 的用户界面,或使用SharePoint Foundation的共享视图中的 Web 部件任务窗格可以将设置-兼容的 HTML 编辑器如SharePoint Designer。