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.
This topic has not yet been rated - Rate this topic

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.

For a list of all members of this type, see IDesignerFilter Members.

[Visual Basic]
Public Interface IDesignerFilter
[C#]
public interface IDesignerFilter
[C++]
public __gc __interface IDesignerFilter
[JScript]
public interface IDesignerFilter

Classes that Implement IDesignerFilter

Class Description
ComponentDesigner Base designer class for extending the design mode behavior of a component.

Remarks

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.

Example

[Visual Basic, C#, C++] 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.

[Visual Basic] 
' Adds a property to this designer's control at design time 
' that indicates the outline color to use.
Protected Overrides Sub PreFilterProperties(ByVal properties As System.Collections.IDictionary)
    properties.Add("OutlineColor", TypeDescriptor.CreateProperty(GetType(TestControlDesigner), "OutlineColor", GetType(System.Drawing.Color), Nothing))
End Sub 

[C#] 
// Adds a property to this designer's control at design time 
// that indicates the outline color to use.
protected override void PreFilterProperties(System.Collections.IDictionary properties)
{
    properties.Add("OutlineColor", TypeDescriptor.CreateProperty(typeof(ExampleControlDesigner), "OutlineColor", typeof(System.Drawing.Color), null));
}

[C++] 
protected:
    void PreFilterProperties(System::Collections::IDictionary* properties) {
        properties->Add(S"OutlineColor", TypeDescriptor::CreateProperty(__typeof(TestControlDesigner),
            S"OutlineColor", __typeof(System::Drawing::Color), 0));
    }

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Namespace: System.ComponentModel.Design

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: System (in System.dll)

See Also

IDesignerFilter Members | System.ComponentModel.Design Namespace | ITypeDescriptorFilterService | TypeDescriptor

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.