語言

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 that 則是該元件設計器實例,或 null 若找不到設計者。

屬性

備註

若此方法找不到有效的 DesignerAttribute,則會搜尋設計者的類別階層。 若在類別階層中找不到設計者,則返回 null。

適用於

另請參閱