ICustomTypeDescriptor Interface
TOC
Collapse the table of content
Expand the table of content

ICustomTypeDescriptor Interface

 

Provides an interface that supplies dynamic custom type information for an object.

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

Public Interface ICustomTypeDescriptor

NameDescription
System_CAPS_pubmethodGetAttributes()

Returns a collection of custom attributes for this instance of a component.

System_CAPS_pubmethodGetClassName()

Returns the class name of this instance of a component.

System_CAPS_pubmethodGetComponentName()

Returns the name of this instance of a component.

System_CAPS_pubmethodGetConverter()

Returns a type converter for this instance of a component.

System_CAPS_pubmethodGetDefaultEvent()

Returns the default event for this instance of a component.

System_CAPS_pubmethodGetDefaultProperty()

Returns the default property for this instance of a component.

System_CAPS_pubmethodGetEditor(Type)

Returns an editor of the specified type for this instance of a component.

System_CAPS_pubmethodGetEvents()

Returns the events for this instance of a component.

System_CAPS_pubmethodGetEvents(Attribute())

Returns the events for this instance of a component using the specified attribute array as a filter.

System_CAPS_pubmethodGetProperties()

Returns the properties for this instance of a component.

System_CAPS_pubmethodGetProperties(Attribute())

Returns the properties for this instance of a component using the attribute array as a filter.

System_CAPS_pubmethodGetPropertyOwner(PropertyDescriptor)

Returns an object that contains the property described by the specified property descriptor.

The ICustomTypeDescriptor interface allows an object to provide type information about itself. Typically, this interface is used when an object needs dynamic type information. In contrast, the TypeDescriptor class provides static type information that is obtained from metadata.

For example, ICustomTypeDescriptor is used in the .NET Framework to provide type information for COM objects. COM objects do not support properties or attributes. Therefore, the .NET Framework uses ICustomTypeDescriptor to implement properties and attributes for COM objects.

To provide dynamic custom type information, a class can implement ICustomTypeDescriptor or derive from the CustomTypeDescriptor class, which provides a simple implementation of this interface.

System_CAPS_noteNote

There is no design-time support for data binding to objects that implement the ICustomTypeDescriptor interface. In addition, when binding to a runtime instance of ICustomTypeDescriptor, the public properties of the underlying type are ignored.

.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft