TypeDescriptor.CreateDesigner(IComponent, Type) Method

Definition

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

C#
public static System.ComponentModel.Design.IDesigner CreateDesigner(System.ComponentModel.IComponent component, Type designerBaseType);
C#
public static System.ComponentModel.Design.IDesigner? CreateDesigner(System.ComponentModel.IComponent component, Type designerBaseType);

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.

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

Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

See also