ContextItemManager.Unsubscribe 方法 (Type, SubscribeContextCallback)

在派生类中重写时,移除一个订阅。

命名空间:  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 设计器扩展性