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;如果 Component 未封装在 IContainer 中,Component 没有与其关联的 ISite 或者 Component 已从其 IContainer 中移除,则为 null
。
- 属性
Component如果 已将 添加到 ,IContainer并且 IContainer 向其分配 ISite ,则 将ISite具有 。 IContainer负责将 分配给 ISiteComponent。 更改组件的 ISite 的值不一定会更改 分配到的站点 Component 的名称。 属性 Site 只能由 IContainer设置。
如果 从其 IContainer中移除,Component则属性值为 null
。 分配给null
此属性不一定从 IContainer中删除 Component 。
可能 Component 具有名称,也可能没有名称。 Component如果为 指定了一个名称,则名称在其 中的其他对象中Component必须是唯一的IContainer。 存储 ISite 的名称 Component;因此,仅 Component 当它具有 ISite 关联的 时,才能命名 。
产品 | 版本 |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |