共用方式為


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 設計工具擴充性