Breyta

Deila með


DesignSurface.CreateComponent(Type) Method

Definition

Caution

CreateComponent has been replaced by CreateInstance and will be removed after Beta2

Creates an instance of a component.

protected public:
 virtual System::ComponentModel::IComponent ^ CreateComponent(Type ^ componentType);
[System.Obsolete("CreateComponent has been replaced by CreateInstance and will be removed after Beta2")]
protected internal virtual System.ComponentModel.IComponent CreateComponent (Type componentType);
[System.Obsolete("CreateComponent has been replaced by CreateInstance and will be removed after Beta2")]
protected internal virtual System.ComponentModel.IComponent? CreateComponent (Type componentType);
[<System.Obsolete("CreateComponent has been replaced by CreateInstance and will be removed after Beta2")>]
abstract member CreateComponent : Type -> System.ComponentModel.IComponent
override this.CreateComponent : Type -> System.ComponentModel.IComponent
Protected Friend Overridable Function CreateComponent (componentType As Type) As IComponent

Parameters

componentType
Type

The type of component to create.

Returns

The newly created component.

Attributes

Exceptions

componentType is null.

The IDesignerHost attached to the DesignSurface has been disposed.

Remarks

The CreateComponent method is called by the design surface's CreateComponent method to create an instance of a component. The component should be created and added to the public container on the design surface.

Applies to