Bewerken

Share via


ToolboxItemContainer.GetToolboxItem(ICollection) Method

Definition

Returns the ToolboxItem contained in the ToolboxItemContainer.

public:
 virtual System::Drawing::Design::ToolboxItem ^ GetToolboxItem(System::Collections::ICollection ^ creators);
public virtual System.Drawing.Design.ToolboxItem GetToolboxItem (System.Collections.ICollection creators);
abstract member GetToolboxItem : System.Collections.ICollection -> System.Drawing.Design.ToolboxItem
override this.GetToolboxItem : System.Collections.ICollection -> System.Drawing.Design.ToolboxItem
Public Overridable Function GetToolboxItem (creators As ICollection) As ToolboxItem

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

See also