Provides an interface to modify the set of member descriptors for a component in design mode.

See Also: ITypeDescriptorFilterService Members


public interface ITypeDescriptorFilterService


The System.ComponentModel.Design.ITypeDescriptorFilterService interface provides an interface that allows modification of the properties, events, and class-level attributes of a component at design time. This modification occurs through the set of descriptors that a component provides through a System.ComponentModel.TypeDescriptor. The type descriptor will query a component's site for the System.ComponentModel.Design.ITypeDescriptorFilterService service and, if it exists, the type descriptor will pass all metadata it has collected to this service. The service can then modify the metadata by adding, removing, and altering existing characteristics of the component.

For example, the properties of a component can be modified through a call to the ITypeDescriptorFilterService.FilterProperties(System.ComponentModel.IComponent, IDictionary) method. The filter service obtains a dictionary that contains property names and their property descriptors of type System.ComponentModel.PropertyDescriptor. The modifications are implemented using the following logic.


Delete the corresponding entry in the dictionary.


Add the appropriate entry to the dictionary.


Call existing property descriptor methods, replace the associated property descriptor entry, or replace the entire property key/value pair in the dictionary.

The return value of ITypeDescriptorFilterService.FilterProperties(System.ComponentModel.IComponent, IDictionary) determines if this set of properties is fixed. If this method returns true, the System.ComponentModel.TypeDescriptor for this component can cache the results. This cache is maintained until either the component is garbage collected or the erload:System.ComponentModel.TypeDescriptor.Refresh method of the type descriptor is called.


Namespace: System.ComponentModel.Design
Assembly: System (in System.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0,,