ToolboxItemAttribute 建構函式
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 ToolboxItemAttribute 類別的新執行個體,並且指定是否使用預設的初始設定值。
ToolboxItemAttribute(Boolean) |
初始化 ToolboxItemAttribute 類別的新執行個體,並且指定是否使用預設的初始設定值。 |
ToolboxItemAttribute(String) |
使用指定的型別名稱,初始化 ToolboxItemAttribute 類別的新執行個體。 |
ToolboxItemAttribute(Type) |
使用指定的工具箱項目型別,初始化 ToolboxItemAttribute 類別的新執行個體。 |
初始化 ToolboxItemAttribute 類別的新執行個體,並且指定是否使用預設的初始設定值。
public:
ToolboxItemAttribute(bool defaultType);
public ToolboxItemAttribute (bool defaultType);
new System.ComponentModel.ToolboxItemAttribute : bool -> System.ComponentModel.ToolboxItemAttribute
Public Sub New (defaultType As Boolean)
參數
- 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 類別的新執行個體。
public:
ToolboxItemAttribute(System::String ^ toolboxItemTypeName);
public ToolboxItemAttribute (string toolboxItemTypeName);
new System.ComponentModel.ToolboxItemAttribute : string -> System.ComponentModel.ToolboxItemAttribute
Public Sub New (toolboxItemTypeName As String)
參數
- 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 類別的新執行個體。
public:
ToolboxItemAttribute(Type ^ toolboxItemType);
public ToolboxItemAttribute (Type toolboxItemType);
new System.ComponentModel.ToolboxItemAttribute : Type -> System.ComponentModel.ToolboxItemAttribute
Public Sub New (toolboxItemType As Type)
參數
- 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 |