資訊
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
本主題尚未接受評分 - 為這個主題評分

Component.Site 屬性

取得或設定 ComponentISite

命名空間:  System.ComponentModel
組件:  System (在 System.dll 中)
[BrowsableAttribute(false)]
public virtual ISite Site { get; set; }

屬性值

型別:System.ComponentModel.ISite
Component 關聯的 ISite。如果 Component 未封裝在 IContainerComponent 沒有關聯的 ISite,或 Component 從其 IContainer 移除,則為 null

實作

IComponent.Site

如果 Component 已經加入至 IContainer,而且 IContainerISite 指派給它,則它會有一個 ISite IContainer 負責將 ISite 指派給 Component 變更元件的 ISite 的值不一定會變更將 Component 指定給站台的名稱。 Site 屬性應該只由 IContainer 設定。

如果將 Component 從其 IContainer 中移除,則屬性值為 null null 指派給這個屬性,不一定能夠將 ComponentIContainer 中移除。

Component 不一定有名稱。 如果 Component 有名稱,它的名稱必須是在其 IContainer 的其他 Component 物件中唯一的名稱。 ISite 儲存 Component 的名稱;因此,只有在 Component 有關聯的 ISite 的情況下,您才可以為它命名。

.NET Framework

支援版本:4.5、4、3.5、3.0、2.0、1.1、1.0

.NET Framework Client Profile

支援版本:4、3.5 SP1

Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (不支援伺服器核心角色), Windows Server 2008 R2 (SP1 (含) 以後版本支援伺服器核心角色,不支援 Itanium)

.NET Framework 並不支援各種平台的所有版本。如需支援的版本的清單,請參閱.NET Framework 系統需求
本文對您有任何幫助嗎?
(剩餘 1500 個字元)

社群新增項目

© 2013 Microsoft. 著作權所有,並保留一切權利。
facebook page visit twitter rss feed newsletter