ToolboxItemAttribute Constructors

Definition

Initializes a new instance of the ToolboxItemAttribute class and specifies whether to use default initialization values.

Overloads

ToolboxItemAttribute(Boolean)

Initializes a new instance of the ToolboxItemAttribute class and specifies whether to use default initialization values.

ToolboxItemAttribute(String)

Initializes a new instance of the ToolboxItemAttribute class using the specified name of the type.

ToolboxItemAttribute(Type)

Initializes a new instance of the ToolboxItemAttribute class using the specified type of the toolbox item.

ToolboxItemAttribute(Boolean)

Source:
ToolboxItemAttribute.cs
Source:
ToolboxItemAttribute.cs
Source:
ToolboxItemAttribute.cs

Initializes a new instance of the ToolboxItemAttribute class and specifies whether to use default initialization values.

C#
public ToolboxItemAttribute(bool defaultType);

Parameters

defaultType
Boolean

true to create a toolbox item attribute for a default type; false to associate no default toolbox item support for this attribute.

Remarks

By default, the ToolboxItemType property is set to ToolboxItem.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

ToolboxItemAttribute(String)

Source:
ToolboxItemAttribute.cs
Source:
ToolboxItemAttribute.cs
Source:
ToolboxItemAttribute.cs

Initializes a new instance of the ToolboxItemAttribute class using the specified name of the type.

C#
public ToolboxItemAttribute(string toolboxItemTypeName);

Parameters

toolboxItemTypeName
String

The names of the type of the toolbox item and of the assembly that contains the type.

Remarks

This constructor expects the toolboxItemTypeName parameter to be in the form <name of the item type>, <name of the assembly> (for example, System.Drawing.Design.ToolboxItem, System.Drawing.Design).

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

ToolboxItemAttribute(Type)

Source:
ToolboxItemAttribute.cs
Source:
ToolboxItemAttribute.cs
Source:
ToolboxItemAttribute.cs

Initializes a new instance of the ToolboxItemAttribute class using the specified type of the toolbox item.

C#
public ToolboxItemAttribute(Type toolboxItemType);

Parameters

toolboxItemType
Type

The type of the toolbox item.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1