ComponentDesigner.ParentComponent 属性


获取此设计器的父组件。Gets the parent component for this designer.

 virtual property System::ComponentModel::IComponent ^ ParentComponent { System::ComponentModel::IComponent ^ get(); };
protected virtual System.ComponentModel.IComponent ParentComponent { get; }
member this.ParentComponent : System.ComponentModel.IComponent
Protected Overridable ReadOnly Property ParentComponent As IComponent


此设计器的父组件,或者如果此设计器为根组件,则为 nullThe parent component for this designer, or null if this designer is the root component.


此属性提供了一种通用机制,用于在设计器中发现父关系,并由 ComponentDesigner 对象的 ITreeDesigner 接口实现使用。This property provides a generic mechanism for discovering parent relationships within designers, and is used by the ComponentDesigner object's ITreeDesigner interface implementation. 此属性应仅在此设计器为根组件时返回 nullThis property should only return null when this designer is the root component. 此属性的默认实现返回非根组件的所有组件的根组件,并为根组件返回 nullThe default implementation of this property returns the root component for all components that are not the root component, and it returns null for the root component.