共用方式為


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