共用方式為


ContextItemManager.Unsubscribe 方法 (Type, SubscribeContextCallback)

在衍生類別 (Derived Class) 中遭覆寫時,就會移除訂閱。

命名空間:  Microsoft.Windows.Design
組件:  Microsoft.Windows.Design.Extensibility (在 Microsoft.Windows.Design.Extensibility.dll 中)

語法

'宣告
Public MustOverride Sub Unsubscribe ( _
    contextItemType As Type, _
    callback As SubscribeContextCallback _
)
public abstract void Unsubscribe(
    Type contextItemType,
    SubscribeContextCallback callback
)
public:
virtual void Unsubscribe(
    Type^ contextItemType, 
    SubscribeContextCallback^ callback
) abstract
abstract Unsubscribe : 
        contextItemType:Type * 
        callback:SubscribeContextCallback -> unit 
public abstract function Unsubscribe(
    contextItemType : Type, 
    callback : SubscribeContextCallback
)

參數

  • contextItemType
    型別:System.Type
    要從其中移除回呼之內容項目的型別。

例外狀況

例外狀況 條件
ArgumentNullException

contextItemType 或 callback 是 nullNull 參照 (即 Visual Basic 中的 Nothing)。

.NET Framework 安全性

請參閱

參考

ContextItemManager 類別

Unsubscribe 多載

Microsoft.Windows.Design 命名空間

ContextItem

SubscribeContextCallback<TContextItemType>

ServiceManager

FeatureManager

其他資源

編輯內容架構

了解 WPF 設計工具擴充性