Share via


ContextItemManager.RemoveCallback Method

A helper method that performs a Delegate.Remove, but knows how to unwrap delegates that are proxies to generic callbacks.

Namespace:  Microsoft.Windows.Design
Assembly:  Microsoft.Windows.Design.Extensibility (in Microsoft.Windows.Design.Extensibility.dll)

Syntax

'Declaration
Protected Shared Function RemoveCallback ( _
    existing As Delegate, _
    toRemove As Delegate _
) As Delegate
protected static Delegate RemoveCallback(
    Delegate existing,
    Delegate toRemove
)
protected:
static Delegate^ RemoveCallback(
    Delegate^ existing, 
    Delegate^ toRemove
)
static member RemoveCallback : 
        existing:Delegate * 
        toRemove:Delegate -> Delegate 
protected static function RemoveCallback(
    existing : Delegate, 
    toRemove : Delegate
) : Delegate

Parameters

Return Value

Type: System.Delegate
The new delegate that should be assigned to existing.

Remarks

Use RemoveCallback in your Unsubscribe implementations.

.NET Framework Security

See Also

Reference

ContextItemManager Class

Microsoft.Windows.Design Namespace

ContextItem

SubscribeContextCallback<TContextItemType>

ServiceManager

FeatureManager

Other Resources

Editing Context Architecture

Understanding WPF Designer Extensibility