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")>]
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á se má 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 návrhové plochy CreateComponent volá metodu vytvoření instance komponenty. Komponenta by se měla vytvořit a přidat do veřejného kontejneru na návrhové ploše.

Platí pro