Component.Site プロパティ

定義

ISiteComponentを取得または設定します。

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に関連付けられているComponentnullComponentにカプセル化されていない場合、IContainerに関連付けられているComponentがない場合、またはISiteがそのComponentから削除された場合にIContainer

実装

属性

注釈

Componentは、ISiteに追加され、IContainerIContainerを割り当てる場合、ISiteを持つことになります。 IContainerは、ISiteComponentに割り当てる役割を担います。 コンポーネントの ISite の値を変更しても、 Component が割り当てられているサイトの名前は必ずしも変更されません。 Site プロパティは、IContainerによってのみ設定する必要があります。

プロパティ値は、nullComponentから削除された場合にIContainerされます。 このプロパティにnullを割り当てると、必ずしもComponentからIContainerが削除されるとは限りません。

Componentは名前を持つ場合もあれば、持っていない場合もあります。 Componentに名前を付ける場合、その名前は、そのComponent内の他のIContainer オブジェクト間で一意である必要があります。 ISiteにはComponentの名前が格納されるため、Componentが関連付けられている場合にのみISiteに名前を付けることができます。

適用対象

こちらもご覧ください