ToolboxBrowsableAttribute Constructor
Initializes a new instance of the ToolboxBrowsableAttribute class.
Assembly: Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)
The following code example shows how to use the ToolboxBrowsableAttribute to enable visibility for a custom control in a designer's toolbox browser.
// Container for any general design-time metadata to initialize. // Designers look for a type in the design-time assembly that // implements IProvideAttributeTable. If found, designers instantiate // this class and access its AttributeTable property automatically. internal class Metadata : IProvideAttributeTable { // Accessed by the designer to register any design-time metadata. public AttributeTable AttributeTable { get { AttributeTableBuilder builder = new AttributeTableBuilder(); builder.AddCustomAttributes( typeof(ButtonWithDesignTime), new ToolboxBrowsableAttribute(true)); return builder.CreateTable(); } } }
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.