Language

DesignSurface.CreateComponent(Type) メソッド

定義

注意事項

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

コンポーネントのインスタンスを作成します。

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

パラメーター

componentType
Type

作成するコンポーネントの種類。

返品

新しく作成されたコンポーネント。

属性

例外

componentType は nullです。

IDesignerHostにアタッチされているDesignSurfaceは破棄されています。

注釈

CreateComponent メソッドは、コンポーネントのインスタンスを作成するために、デザイン サーフェイスの CreateComponent メソッドによって呼び出されます。 コンポーネントを作成し、デザイン サーフェイスのパブリック コンテナーに追加する必要があります。

適用対象