AdapterService.GetAdapter 方法 (Type, Type)

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

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

语法

声明
Public MustOverride Function GetAdapter ( _
    adapterType As Type, _
    itemType As Type _
) As Adapter
public abstract Adapter GetAdapter(
    Type adapterType,
    Type itemType
)
public:
virtual Adapter^ GetAdapter(
    Type^ adapterType, 
    Type^ itemType
) abstract
abstract GetAdapter : 
        adapterType:Type * 
        itemType:Type -> Adapter 
public abstract function GetAdapter(
    adapterType : Type, 
    itemType : Type
) : Adapter

参数

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

返回值

类型:Microsoft.Windows.Design.Interaction.Adapter
itemType 的 adapterType 类型的 Adapter

备注

如果该项没有提供这样的适配器,此方法可能返回 nullnull 引用(在 Visual Basic 中为 Nothing)。

.NET Framework 安全性

请参见

参考

AdapterService 类

GetAdapter 重载

Microsoft.Windows.Design.Services 命名空间

Adapter

ParentAdapter

其他资源

了解 WPF 设计器扩展性