ToolboxItemAttribute 建構函式

定義

初始化 ToolboxItemAttribute 類別的新執行個體,並且指定是否使用預設的初始設定值。

多載

ToolboxItemAttribute(Boolean)

初始化 ToolboxItemAttribute 類別的新執行個體,並且指定是否使用預設的初始設定值。

ToolboxItemAttribute(String)

使用指定的型別名稱,初始化 ToolboxItemAttribute 類別的新執行個體。

ToolboxItemAttribute(Type)

使用指定的工具箱項目型別,初始化 ToolboxItemAttribute 類別的新執行個體。

ToolboxItemAttribute(Boolean)

來源:
ToolboxItemAttribute.cs
來源:
ToolboxItemAttribute.cs
來源:
ToolboxItemAttribute.cs

初始化 ToolboxItemAttribute 類別的新執行個體,並且指定是否使用預設的初始設定值。

C#
public ToolboxItemAttribute (bool defaultType);

參數

defaultType
Boolean

true,為預設型別建立工具箱項目屬性;false,則為這個屬性沒有關聯的預設工具箱項目支援。

備註

預設的情況下,ToolboxItemType 屬性設定為 ToolboxItem

適用於

.NET 9 和其他版本
產品 版本
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.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)

來源:
ToolboxItemAttribute.cs
來源:
ToolboxItemAttribute.cs
來源:
ToolboxItemAttribute.cs

使用指定的型別名稱,初始化 ToolboxItemAttribute 類別的新執行個體。

C#
public ToolboxItemAttribute (string toolboxItemTypeName);

參數

toolboxItemTypeName
String

工具箱項目型別的名稱,以及包含型別的組件。

備註

此建構函式預期 toolboxItemTypeName 參數的格式 <名稱為專案類型><元件> 名稱 (例如 System.Drawing.Design.ToolboxItem,System.Drawing.Design) 。

適用於

.NET 9 和其他版本
產品 版本
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.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)

來源:
ToolboxItemAttribute.cs
來源:
ToolboxItemAttribute.cs
來源:
ToolboxItemAttribute.cs

使用指定的工具箱項目型別,初始化 ToolboxItemAttribute 類別的新執行個體。

C#
public ToolboxItemAttribute (Type toolboxItemType);

參數

toolboxItemType
Type

工具箱項目的型別。

適用於

.NET 9 和其他版本
產品 版本
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.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