ITypeDescriptorContext.Instance Property

Definition

获取与此类型说明符请求相连接的对象。Gets the object that is connected with this type descriptor request.

public:
 property System::Object ^ Instance { System::Object ^ get(); };
public object Instance { get; }
member this.Instance : obj
Public ReadOnly Property Instance As Object

Property Value

Object

调用 TypeDescriptor 的方法的对象;否则,如果不存在负责调用的对象,则为 nullThe object that invokes the method on the TypeDescriptor; otherwise, null if there is no object responsible for the call.

Remarks

Instance 属性获取正在调用 ITypeDescriptorContext 接口的对象。The Instance property gets the object that is invoking the ITypeDescriptorContext interface. 例如,如果向类型转换器提供要转换的 Color,则 Instance 返回使用 Color的控件的实际实例。For example, if a type converter is given a Color to convert, Instance returns the actual instance of the control that is using the Color. 然后,你可以查询控件以获取有关其服务及其 Container的详细信息。You can subsequently query the control for further information about its services and its Container.

Applies to

See also