DesignSurface.CreateComponent(Type) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
注意
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。
注解
该方法 CreateComponent 由设计图面 CreateComponent 的方法调用,以创建组件的实例。 组件应创建并添加到设计图面上的公共容器。