AdapterService.GetAdapter<TAdapterType> 方法 (Type)

为指定的项返回指定的适配器类型的适配器。

命名空间:  Microsoft.Windows.Design.Services
程序集:  Microsoft.Windows.Design.Interaction(在 Microsoft.Windows.Design.Interaction.dll 中)

语法

声明
Public Function GetAdapter(Of TAdapterType As Adapter) ( _
    itemType As Type _
) As TAdapterType
public TAdapterType GetAdapter<TAdapterType>(
    Type itemType
)
where TAdapterType : Adapter
public:
generic<typename TAdapterType>
where TAdapterType : Adapter
TAdapterType GetAdapter(
    Type^ itemType
)
member GetAdapter : 
        itemType:Type -> 'TAdapterType  when 'TAdapterType : Adapter
JScript 不支持泛型类型或方法。

类型参数

  • TAdapterType
    适配器的类型。

参数

  • itemType
    类型:System.Type
    要为其获取适配器的项。

返回值

类型:TAdapterType
itemType 的 TAdapterType 类型的 Adapter

.NET Framework 安全性

请参见

参考

AdapterService 类

GetAdapter 重载

Microsoft.Windows.Design.Services 命名空间

Adapter

ParentAdapter

其他资源

了解 WPF 设计器扩展性