DesignSurface.CreateComponent(Type) Metoda

Definice

Upozornění

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

Vytvoří instanci komponenty.

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

Parametry

componentType
Type

Typ komponenty, který chcete vytvořit.

Návraty

Nově vytvořená komponenta.

Atributy

Výjimky

componentType je null.

Připojená IDesignerHost k objektu DesignSurface byla odstraněna.

Poznámky

Metoda CreateComponent je volána metodou návrhové CreateComponent plochy k vytvoření instance komponenty. Komponenta by měla být vytvořena a přidána do veřejného kontejneru na návrhové ploše.

Platí pro