Bagikan melalui


DesignSurface.CreateComponent(Type) Metode

Definisi

Perhatian

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

Membuat instans komponen.

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

Parameter

componentType
Type

Jenis komponen yang akan dibuat.

Mengembalikan

Komponen yang baru dibuat.

Atribut

Pengecualian

componentTypeadalah null.

Yang IDesignerHost terpasang pada DesignSurface telah dibuang.

Keterangan

Metode CreateComponent ini dipanggil dengan metode permukaan CreateComponent desain untuk membuat instans komponen. Komponen harus dibuat dan ditambahkan ke kontainer publik pada permukaan desain.

Berlaku untuk