DesignSurface.CreateComponent(Type) Método

Definición

Precaución

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

Crea una instancia de un componente.

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

Parámetros

componentType
Type

Tipo de componente que se va a crear.

Devoluciones

Componente recién creado.

Atributos

Excepciones

componentType es null.

La interfaz IDesignerHost asociada al objeto DesignSurface se ha desechado.

Comentarios

El CreateComponent método de la superficie de CreateComponent diseño llama al método para crear una instancia de un componente. El componente debe crearse y agregarse al contenedor público en la superficie de diseño.

Se aplica a