Component.Site 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
public:
virtual property System::ComponentModel::ISite ^ Site { System::ComponentModel::ISite ^ get(); void set(System::ComponentModel::ISite ^ value); };
[System.ComponentModel.Browsable(false)]
public virtual System.ComponentModel.ISite? Site { get; set; }
[System.ComponentModel.Browsable(false)]
public virtual System.ComponentModel.ISite Site { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.Site : System.ComponentModel.ISite with get, set
Public Overridable Property Site As ISite
屬性值
ISite與 相關的 Component,若 Componentnull 未被封裝在 IContainer中,則 Component 不與 ISite 相關聯,或 Component 從其 IContainer中移除。
實作
- 屬性
備註
Component A 若被加入 an IContainer 並IContainer指派 a ISite 為 a,則 a 將 ISite a 加到該 a。 負責 IContainer 將 指 ISite 派到 Component。 改變元件 ISite 的值不一定會改變該 Component 元件所指派的站點名稱。 該 Site 屬性應該只由一個 IContainer來設定。
若Component將 從其 IContainer中移除,則屬性值為 。null 將 null 指派到此屬性不一定會從 中移除 。ComponentIContainer
A Component 可能有名字,也可能沒有。 若 a Component 被賦予一個名稱,該名稱必須在其 內的其他物件IContainer中Component是唯一的。 該ISite儲存名稱Component;因此,只有當 a 與 ISite 相關聯時,你才能命名 aComponent。