TypeDescriptor.CreateDesigner(IComponent, Type) Metoda

Definice

Vytvoří instanci návrháře asociovaného se zadanou komponentou a zadaným typem návrháře.

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

Parametry

component
IComponent

Určuje IComponent komponentu, která se má přidružit k návrháři.

designerBaseType
Type

Jedná se Type o typ návrháře, který se má vytvořit.

Návraty

Jedná IDesigner se o instanci návrháře pro komponentu nebo null pokud nebyl nalezen žádný návrhář.

Atributy

Poznámky

Pokud tato metoda nemůže najít platnou DesignerAttribute, vyhledá hierarchii tříd návrháře. Pokud nemůže najít návrháře v hierarchii tříd, vrátí null.

Platí pro

Viz také