Прочитај на енглеском Уреди

Делите путем


IToolboxService.AddCreator Method

Definition

Adds a new toolbox item creator for a specified data format.

Overloads

AddCreator(ToolboxItemCreatorCallback, String)

Adds a new toolbox item creator for a specified data format.

AddCreator(ToolboxItemCreatorCallback, String, IDesignerHost)

Adds a new toolbox item creator for a specified data format and designer host.

AddCreator(ToolboxItemCreatorCallback, String)

Source:
IToolboxService.cs
Source:
IToolboxService.cs
Source:
IToolboxService.cs

Adds a new toolbox item creator for a specified data format.

C#
public void AddCreator(System.Drawing.Design.ToolboxItemCreatorCallback creator, string format);

Parameters

creator
ToolboxItemCreatorCallback

A ToolboxItemCreatorCallback that can create a component when the toolbox item is invoked.

format
String

The data format that the creator handles.

Remarks

A toolbox item creator can convert data of a particular data format that has been pasted or dropped on the toolbox into a ToolboxItem. If a creator handles more than one format, call AddCreator more than once. Unexpected behavior may result if you add more than one creator for the same format.

See also

Applies to

.NET Framework 4.8.1 и друге верзије
Производ Верзије
.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
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

AddCreator(ToolboxItemCreatorCallback, String, IDesignerHost)

Source:
IToolboxService.cs
Source:
IToolboxService.cs
Source:
IToolboxService.cs

Adds a new toolbox item creator for a specified data format and designer host.

C#
public void AddCreator(System.Drawing.Design.ToolboxItemCreatorCallback creator, string format, System.ComponentModel.Design.IDesignerHost host);

Parameters

creator
ToolboxItemCreatorCallback

A ToolboxItemCreatorCallback that can create a component when the toolbox item is invoked.

format
String

The data format that the creator handles.

host
IDesignerHost

The IDesignerHost that represents the designer host to associate with the creator.

Remarks

A toolbox item creator can convert data of a particular data format that has been pasted or dropped on the toolbox into a ToolboxItem. If a creator handles more than one format, call AddCreator more than once. Unexpected behavior may result if you add more than one creator for the same format.

If the host parameter is set to null, the creator will be available to all designers. If a designer host is supplied, the creator will only be available to designers using the specified host.

See also

Applies to

.NET Framework 4.8.1 и друге верзије
Производ Верзије
.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
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10