Share via


ContextItemManager.GetTarget Method

A utility method that returns the target object for a delegate.

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

Syntax

'Declaration
Protected Shared Function GetTarget ( _
    callback As Delegate _
) As Object
protected static Object GetTarget(
    Delegate callback
)
protected:
static Object^ GetTarget(
    Delegate^ callback
)
static member GetTarget : 
        callback:Delegate -> Object 
protected static function GetTarget(
    callback : Delegate
) : Object

Parameters

Return Value

Type: System.Object
The target object of the callback.

Exceptions

Exception Condition
ArgumentNullException

callback is nulla null reference (Nothing in Visual Basic).

Remarks

If the delegate was created to proxy a generic delegate, the GetTarget method correctly returns the original object, not the proxy.

.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