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 IDesignerFilter
Dim instance As IDesignerFilter

public interface IDesignerFilter
public interface IDesignerFilter
Not applicable.

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.

' Adds a property to this designer's control at design time 
' that indicates the outline color to use.
' The DesignOnlyAttribute ensures that the OutlineColor
' property is not serialized by the designer.
Protected Overrides Sub PreFilterProperties(ByVal properties As System.Collections.IDictionary)
    Dim pd As PropertyDescriptor = TypeDescriptor.CreateProperty( _
    GetType(ExampleControlDesigner), _
    "OutlineColor", _
    GetType(System.Drawing.Color), _
    New Attribute() {New DesignOnlyAttribute(True)})

    properties.Add("OutlineColor", pd)
End Sub

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0