TypeDescriptor.CreateDesigner 方法

创建与指定组件关联的设计器和指定类型的设计器的实例。

**命名空间:**System.ComponentModel
**程序集:**System(在 system.dll 中)

语法

声明
Public Shared Function CreateDesigner ( _
    component As IComponent, _
    designerBaseType As Type _
) As IDesigner
用法
Dim component As IComponent
Dim designerBaseType As Type
Dim returnValue As IDesigner

returnValue = TypeDescriptor.CreateDesigner(component, designerBaseType)
public static IDesigner CreateDesigner (
    IComponent component,
    Type designerBaseType
)
public:
static IDesigner^ CreateDesigner (
    IComponent^ component, 
    Type^ designerBaseType
)
public static IDesigner CreateDesigner (
    IComponent component, 
    Type designerBaseType
)
public static function CreateDesigner (
    component : IComponent, 
    designerBaseType : Type
) : IDesigner

参数

  • component
    一个 IComponent,指定与设计器相关联的组件。
  • designerBaseType
    一个 Type,表示要创建的设计器的类型。

返回值

一个 IDesigner,它是组件设计器的实例;如果找不到任何设计器,则为 空引用(在 Visual Basic 中为 Nothing)。

备注

如果该方法未能找到有效的 DesignerAttribute,它将向上搜索类层次结构中的设计器。如果未能在类层次结构中找到设计器,它返回 空引用(在 Visual Basic 中为 Nothing)。

平台

Windows 98、Windows 2000 SP4、Windows Millennium Edition、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

请参见

参考

TypeDescriptor 类
TypeDescriptor 成员
System.ComponentModel 命名空间
IComponent 接口
IDesigner
GetReflectionType
GetConverter
GetEditor