Redigera

Dela via


ICustomTypeDescriptor Interface

Definition

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

public interface class ICustomTypeDescriptor
public interface ICustomTypeDescriptor
type ICustomTypeDescriptor = interface
Public Interface ICustomTypeDescriptor
Derived

Remarks

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.

Note

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.

Properties

RequireRegisteredTypes

Gets a value that indicates whether types are required to be registered through RegisterType<T>().

Methods

GetAttributes()

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

GetClassName()

Returns the class name of this instance of a component.

GetComponentName()

Returns the name of this instance of a component.

GetConverter()

Returns a type converter for this instance of a component.

GetConverterFromRegisteredType()

Returns a type converter for this instance of a component that might be registered.

GetDefaultEvent()

Returns the default event for this instance of a component.

GetDefaultProperty()

Returns the default property for this instance of a component.

GetEditor(Type)

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

GetEvents()

Returns the events for this instance of a component.

GetEvents(Attribute[])

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

GetEventsFromRegisteredType()

Returns the events for this instance of a component that might be registered.

GetProperties()

Returns the properties for this instance of a component.

GetProperties(Attribute[])

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

GetPropertiesFromRegisteredType()

Returns the properties for this instance of a component that might be registered.

GetPropertyOwner(PropertyDescriptor)

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

Applies to

See also