System.ComponentModel.ToolboxItemFilterAttribute Class

Specifies the filter string and filter type to use for a toolbox item.

See Also: ToolboxItemFilterAttribute


[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)]
public sealed class ToolboxItemFilterAttribute : Attribute


ToolboxItemFilterAttribute provides a mechanism by which toolbox items can be marked for use only with designers that have a matching attribute or code that determines whether the item should be enabled or disabled in the toolbox.

A ToolboxItemFilterAttribute can be applied to a ToolboxItem to indicate a filter string and filter type that specify when to enable or disable the item. ToolboxItemFilterAttribute can also be applied to a designer to indicate its requirements for enabling items in the toolbox. This type of attribute can be used to indicate that a toolbox item can only be enabled when a designer with a matching filter string is being used. The type of the filter is indicated in the ToolboxItemFilterAttribute.FilterType property by a ToolboxItemFilterType that indicates whether and how a filter string match is used, or whether to use custom code to determine whether to enable an item.


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

The members of System.ComponentModel.ToolboxItemFilterAttribute are listed below.

See Also: Attribute

Public Constructors

Initializes a new instance of the ToolboxItemFilterAttribute class using the specified filter string.

Initializes a new instance of the ToolboxItemFilterAttribute class using the specified filter string and type.

Public Properties


Gets the filter string for the toolbox item.


Gets the type of the filter.


Gets the type ID for the attribute.

Public Methods

Equals(Object) : Boolean
GetHashCode() : Int32
Match(Object) : Boolean

Indicates whether the specified object has a matching filter string.

ToString() : String