TypeDescriptor.CreateDesigner(IComponent, Type) Метод
Определение
Создает экземпляр конструктора, связанный с указанным компонентом указанного типа конструктора.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);
public static System.ComponentModel.Design.IDesigner CreateDesigner (System.ComponentModel.IComponent component, Type designerBaseType);
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, указывающий компонент, который нужно связать с конструктором.An IComponent that specifies the component to associate with the designer.
- designerBaseType
- Type
Объект Type, представляющий тип создаваемого конструктора.A Type that represents the type of designer to create.
Возвращаемое значение
Объект IDesigner, являющийся экземпляром конструктора для компонента, или null
, если конструктор не удается найти.An IDesigner that is an instance of the designer for the component, or null
if no designer can be found.
Комментарии
Если этот метод не может найти допустимый объект DesignerAttribute , он выполняет поиск по иерархии классов для конструктора.If this method cannot find a valid DesignerAttribute, it searches up the class hierarchy for a designer. Если конструктор не удается найти в иерархии классов, возвращается значение null
.If it cannot find a designer in the class hierarchy, it returns null
.