DesignSurface.CreateComponent(Type) Metoda

Definicja

Przestroga

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

Tworzy wystąpienie składnika.

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 składnika do utworzenia.

Zwraca

Nowo utworzony składnik.

Atrybuty

Wyjątki

componentType to null.

Dołączony IDesignerHost do elementu DesignSurface został usunięty.

Uwagi

Metoda CreateComponent jest wywoływana przez metodę powierzchni projektowej CreateComponent w celu utworzenia wystąpienia składnika. Składnik powinien zostać utworzony i dodany do kontenera publicznego na powierzchni projektowej.

Dotyczy