Edit

Share via


TypeDescriptor.CreateDesigner(IComponent, Type) Method

Definition

Creates an instance of the designer associated with the specified component and of the specified type of designer.

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

Parameters

component
IComponent

An IComponent that specifies the component to associate with the designer.

designerBaseType
Type

A Type that represents the type of designer to create.

Returns

An IDesigner that is an instance of the designer for the component, or null if no designer can be found.

Attributes

Remarks

If this method cannot find a valid DesignerAttribute, it searches up the class hierarchy for a designer. If it cannot find a designer in the class hierarchy, it returns null.

Applies to

See also