WebPartDisplayMode.AssociatedWithToolZone 屬性

定義

取得值,表示特定顯示模式是否與衍生自 ToolZone 類別的類別關聯。

public:
 virtual property bool AssociatedWithToolZone { bool get(); };
public virtual bool AssociatedWithToolZone { get; }
member this.AssociatedWithToolZone : bool
Public Overridable ReadOnly Property AssociatedWithToolZone As Boolean

屬性值

如果顯示模式與 ToolZone 類別關聯,則為 true,否則為 false。 預設為 false

備註

當網頁元件頁面進入屬性設定 true 為 的顯示模式 AssociatedWithToolZone 時, WebPartManager 控制項會解譯該模式,表示相關聯的類別衍生自 ToolZone 類別,而且需要顯示額外的使用者介面 (UI) 元素。 例如,當頁面進入編輯模式時,包含編輯網頁元件控制項 UI 元素的特殊區域會出現在頁面上。 這個行為是可行的,因為 AssociatedWithToolZone 欄位上的 EditDisplayMode 屬性值設定為 true

給繼承者的注意事項

衍生自基類以建立自訂顯示模式的 WebPartDisplayMode 類別必須覆寫 AssociatedWithToolZone 屬性,才能設定其值。

適用於

另請參閱