Поделиться через


ServiceManager.GetTarget Method

A helper method that gets 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 of callback.

Exceptions

Exception Condition
ArgumentNullException

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

Remarks

This method can return nulla null reference (Nothing in Visual Basic) if the callback represents a static object.

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

.NET Framework Security

See Also

Reference

ServiceManager Class

Microsoft.Windows.Design Namespace

EditingContext

ContextItem

Other Resources

WPF Designer Extensibility