ToolboxItemContainer.GetToolboxItem(ICollection) Method

Definition

Returns the ToolboxItem contained in the ToolboxItemContainer.

C#
public virtual System.Drawing.Design.ToolboxItem GetToolboxItem(System.Collections.ICollection creators);

Parameters

creators
ICollection

A collection of ToolboxItemCreator objects.

Returns

The ToolboxItem contained in the ToolboxItemContainer.

Remarks

The creators parameter is a collection of ToolboxItemCreator objects that represent any custom ToolboxItem creators that should be included when the ToolboxItem is obtained. This parameter can be null if no creators are needed.

The GetToolboxItem method returns a ToolboxItem that represents the data stored in the ToolboxItemContainer. GetToolboxItem never returns null, nor does it ever raise an exception, except in extreme cases (for example, out of memory). If a ToolboxItem cannot be fabricated, the appropriate exception is embedded within a special ToolboxItem. The exception is thrown when the CreateComponents method on this special ToolboxItem is called. This puts the exception at the point of user action.

Applies to

Product Versions
.NET Framework 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

See also