Edit

Share via


ToolboxItemContainer Constructors

Definition

Initializes a new instance of the ToolboxItemContainer class.

Overloads

ToolboxItemContainer(ToolboxItem)

Initializes a new instance of the ToolboxItemContainer class from a ToolboxItem.

ToolboxItemContainer(IDataObject)

Initializes a new instance of the ToolboxItemContainer class from a IDataObject.

ToolboxItemContainer(SerializationInfo, StreamingContext)

Initializes a new instance of the ToolboxItemContainer class from a serialization stream.

ToolboxItemContainer(ToolboxItem)

Initializes a new instance of the ToolboxItemContainer class from a ToolboxItem.

public:
 ToolboxItemContainer(System::Drawing::Design::ToolboxItem ^ item);
public ToolboxItemContainer (System.Drawing.Design.ToolboxItem item);
new System.Drawing.Design.ToolboxItemContainer : System.Drawing.Design.ToolboxItem -> System.Drawing.Design.ToolboxItemContainer
Public Sub New (item As ToolboxItem)

Parameters

item
ToolboxItem

The ToolboxItem for which to create a ToolboxItemContainer.

Remarks

The container's cache of information is filled by accessing properties on the ToolboxItem.

See also

Applies to

ToolboxItemContainer(IDataObject)

Initializes a new instance of the ToolboxItemContainer class from a IDataObject.

public:
 ToolboxItemContainer(System::Windows::Forms::IDataObject ^ data);
public ToolboxItemContainer (System.Windows.Forms.IDataObject data);
new System.Drawing.Design.ToolboxItemContainer : System.Windows.Forms.IDataObject -> System.Drawing.Design.ToolboxItemContainer
Public Sub New (data As IDataObject)

Parameters

data
IDataObject

A data object that represents a ToolboxItemContainer.

Remarks

The data parameter may contain data provided by the ToolboxItemContainer class. It may contain data that can be read by one of the ToolboxItem creators that have been supplied by the user. It may also be data with a clipboard format that has a ToolboxItem creator assigned to it. In this case, the ToolboxItem is created on demand.

Notes to Inheritors

Generally, it is not necessary to override the serialization mechanism for a ToolboxItemContainer. ToolboxItemContainer objects implement serialization by saving the IDataObject returned from the ToolboxData property. When you override ToolboxData and provide your own custom data, this data is included with the default ISerializable implementation. Override the default serialization implementation only if you intend to store private details about this ToolboxItemContainer that should not be exposed through the public data object.

See also

Applies to

ToolboxItemContainer(SerializationInfo, StreamingContext)

Initializes a new instance of the ToolboxItemContainer class from a serialization stream.

protected:
 ToolboxItemContainer(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected ToolboxItemContainer (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Drawing.Design.ToolboxItemContainer : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Drawing.Design.ToolboxItemContainer
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameters

info
SerializationInfo

The serialization information passed in by the serializer when deserializing the ToolboxItemContainer.

context
StreamingContext

The streaming context passed in by the serializer when deserializing the ToolboxItemContainer.

Notes to Inheritors

ToolboxItemContainer objects can be serialized. Generally, it is not necessary to override the serialization mechanism for a ToolboxItemContainer. ToolboxItemContainer objects implement serialization by saving the IDataObject returned from the ToolboxData property. When you override ToolboxData and provide your own custom data, this data is included with the default ISerializable implementation. Override the default serialization implementation only if you intend to store private details about this ToolboxItemContainer that should not be exposed through the public data object.

See also

Applies to