TypeDescriptor.CreateDesigner(IComponent, Type) 方法

定义

创建与指定组件和指定类型设计器关联的设计器的实例。

public:
 static System::ComponentModel::Design::IDesigner ^ CreateDesigner(System::ComponentModel::IComponent ^ component, Type ^ designerBaseType);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Design-time attributes are not preserved when trimming. Types referenced by attributes like EditorAttribute and DesignerAttribute may not be available after trimming.")]
public static System.ComponentModel.Design.IDesigner? CreateDesigner(System.ComponentModel.IComponent component, Type designerBaseType);
public static System.ComponentModel.Design.IDesigner CreateDesigner(System.ComponentModel.IComponent component, Type designerBaseType);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of component cannot be statically discovered.")]
public static System.ComponentModel.Design.IDesigner? CreateDesigner(System.ComponentModel.IComponent component, Type designerBaseType);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Design-time attributes are not preserved when trimming. Types referenced by attributes like EditorAttribute and DesignerAttribute may not be available after trimming.")>]
static member CreateDesigner : System.ComponentModel.IComponent * Type -> System.ComponentModel.Design.IDesigner
static member CreateDesigner : System.ComponentModel.IComponent * Type -> System.ComponentModel.Design.IDesigner
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of component cannot be statically discovered.")>]
static member CreateDesigner : System.ComponentModel.IComponent * Type -> System.ComponentModel.Design.IDesigner
Public Shared Function CreateDesigner (component As IComponent, designerBaseType As Type) As IDesigner

参数

component
IComponent

指定要 IComponent 与设计器关联的组件。

designerBaseType
Type

一个 Type 表示要创建的设计器的类型。

返回

IDesigner它是组件的设计器实例,或者null找不到设计器。

属性

注解

如果此方法找不到有效 DesignerAttribute方法,它将搜索设计器的类层次结构。 如果它找不到类层次结构中的设计器,则返回 null

适用于

另请参阅