移除一个回调方法,以便在编辑上下文中的选择更改时不会调用该方法。
命名空间:  Microsoft.Windows.Design.Interaction
程序集:  Microsoft.Windows.Design.Interaction(在 Microsoft.Windows.Design.Interaction.dll 中)
语法
声明
Public Shared Sub Unsubscribe ( _
    context As EditingContext, _
    handler As SubscribeContextCallback(Of Selection) _
)
public static void Unsubscribe(
    EditingContext context,
    SubscribeContextCallback<Selection> handler
)
public:
static void Unsubscribe(
    EditingContext^ context, 
    SubscribeContextCallback<Selection^>^ handler
)
static member Unsubscribe : 
        context:EditingContext * 
        handler:SubscribeContextCallback<Selection> -> unit 
public static function Unsubscribe(
    context : EditingContext, 
    handler : SubscribeContextCallback<Selection>
)
参数
- context
 类型:Microsoft.Windows.Design.EditingContext
 感兴趣的编辑上下文。
- handler
 类型:Microsoft.Windows.Design.SubscribeContextCallback<Selection>
 移除的方法。
异常
| 异常 | 条件 | 
|---|---|
| ArgumentNullException | context 或 handler 为 nullnull 引用(在 Visual Basic 中为 Nothing)。 | 
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。
请参见
参考
Microsoft.Windows.Design.Interaction 命名空间