ITypeDescriptorContext Interface

 

Provides contextual information about a component, such as its container and property descriptor.

Namespace:   System.ComponentModel
Assembly:  System (in System.dll)

No code example is currently available or this language may not be supported.

NameDescription
System_CAPS_pubpropertyContainer

Gets the container representing this TypeDescriptor request.

System_CAPS_pubpropertyInstance

Gets the object that is connected with this type descriptor request.

System_CAPS_pubpropertyPropertyDescriptor

Gets the PropertyDescriptor that is associated with the given context item.

NameDescription
System_CAPS_pubmethodGetService(Type)

Gets the service object of the specified type.(Inherited from IServiceProvider.)

System_CAPS_pubmethodOnComponentChanged()

Raises the ComponentChanged event.

System_CAPS_pubmethodOnComponentChanging()

Raises the ComponentChanging event.

The ITypeDescriptorContext interface provides contextual information about a component. ITypeDescriptorContext is typically used at design time to provide information about a design-time container. This interface is commonly used in type conversion. For details, see TypeConverter.

System_CAPS_noteNote

Do not rely on the presence of this interface when you design a type converter. If a particular interface, property, or service is necessary but not available, the type converter should return null rather than throw an exception. This interface's properties can return null at any time, and you should plan for this.

The following code example demonstrates how to use the ITypeDescriptorContext interface to support type conversion.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: