Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IDesignerFilter Interface

 

Provides an interface that enables a designer to access and filter the dictionaries of a TypeDescriptor that stores the property, attribute, and event descriptors that a component designer can expose to the design-time environment.

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

public interface class IDesignerFilter

NameDescription
System_CAPS_pubmethodPostFilterAttributes(IDictionary^)

When overridden in a derived class, allows a designer to change or remove items from the set of attributes that it exposes through a TypeDescriptor.

System_CAPS_pubmethodPostFilterEvents(IDictionary^)

When overridden in a derived class, allows a designer to change or remove items from the set of events that it exposes through a TypeDescriptor.

System_CAPS_pubmethodPostFilterProperties(IDictionary^)

When overridden in a derived class, allows a designer to change or remove items from the set of properties that it exposes through a TypeDescriptor.

System_CAPS_pubmethodPreFilterAttributes(IDictionary^)

When overridden in a derived class, allows a designer to add items to the set of attributes that it exposes through a TypeDescriptor.

System_CAPS_pubmethodPreFilterEvents(IDictionary^)

When overridden in a derived class, allows a designer to add items to the set of events that it exposes through a TypeDescriptor.

System_CAPS_pubmethodPreFilterProperties(IDictionary^)

When overridden in a derived class, allows a designer to add items to the set of properties that it exposes through a TypeDescriptor.

IDesignerFilter enables a designer to filter the set of property, attribute, and event descriptors that its associated component exposes through a TypeDescriptor. The methods of this interface whose names begin with Pre are called immediately before the methods whose names begin with Post.

If you want to add attribute, event, or property descriptors, use a PreFilterAttributes, PreFilterEvents, or PreFilterProperties method.

If you want to change or remove attribute, event, or property descriptors, use a PostFilterAttributes, PostFilterEvents, or PostFilterProperties method.

The following example demonstrates an override of PreFilterProperties that adds a property of the designer to the Properties window when the designer's control is selected at design time. See the example for the ControlDesigner class for a complete designer example that uses the IDesignerFilter interface.

protected:
   [ReflectionPermission(SecurityAction::Demand, Flags=ReflectionPermissionFlag::MemberAccess)]
   virtual void PreFilterProperties( System::Collections::IDictionary^ properties ) override
   {
      properties->Add( "OutlineColor", TypeDescriptor::CreateProperty( TestControlDesigner::typeid, "OutlineColor", System::Drawing::Color::typeid, nullptr ) );
   }

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