C# Class Illusion.Action

A host for action related attached properties.
Mostra file Open project: kasicass/kasicass

Public Properties

Property Type Description
TargetProperty System.Windows.DependencyProperty
TargetWithoutContextProperty System.Windows.DependencyProperty

Public Methods

Method Description
GetTarget ( DependencyObject d ) : object

Gets the target for instances of ActionMessage .

GetTargetWithoutContext ( DependencyObject d ) : object

Gets the target for instances of ActionMessage .

HasTargetSet ( DependencyObject element ) : bool

Checks if the ActionMessage -Target was set.

Invoke ( object target, string methodName, DependencyObject view = null, FrameworkElement source = null, object eventArgs = null, object parameters = null ) : void

Uses the action pipeline to invoke the method.

SetTarget ( DependencyObject d, object target ) : void

Sets the target of the ActionMessage .

SetTargetWithoutContext ( DependencyObject d, object target ) : void

Sets the target of the ActionMessage .

The DataContext will not be set.

Private Methods

Method Description
OnTargetChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnTargetWithoutContextChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
SetTargetCore ( System.Windows.DependencyPropertyChangedEventArgs e, DependencyObject d, bool setContext ) : void

Method Details

GetTarget() public static method

Gets the target for instances of ActionMessage .
public static GetTarget ( DependencyObject d ) : object
d System.Windows.DependencyObject The element to which the target is attached.
return object

GetTargetWithoutContext() public static method

Gets the target for instances of ActionMessage .
public static GetTargetWithoutContext ( DependencyObject d ) : object
d System.Windows.DependencyObject The element to which the target is attached.
return object

HasTargetSet() public static method

Checks if the ActionMessage -Target was set.
public static HasTargetSet ( DependencyObject element ) : bool
element System.Windows.DependencyObject DependencyObject to check
return bool

Invoke() public static method

Uses the action pipeline to invoke the method.
public static Invoke ( object target, string methodName, DependencyObject view = null, FrameworkElement source = null, object eventArgs = null, object parameters = null ) : void
target object The object instance to invoke the method on.
methodName string The name of the method to invoke.
view System.Windows.DependencyObject The view.
source System.Windows.FrameworkElement The source of the invocation.
eventArgs object The event args.
parameters object The method parameters.
return void

SetTarget() public static method

Sets the target of the ActionMessage .
public static SetTarget ( DependencyObject d, object target ) : void
d System.Windows.DependencyObject The element to attach the target to.
target object The target for instances of .
return void

SetTargetWithoutContext() public static method

Sets the target of the ActionMessage .
The DataContext will not be set.
public static SetTargetWithoutContext ( DependencyObject d, object target ) : void
d System.Windows.DependencyObject The element to attach the target to.
target object The target for instances of .
return void

Property Details

TargetProperty public_oe static_oe property

A property definition representing the target of an ActionMessage . The DataContext of the element will be set to this instance.
public static DependencyProperty,System.Windows TargetProperty
return System.Windows.DependencyProperty

TargetWithoutContextProperty public_oe static_oe property

A property definition representing the target of an ActionMessage . The DataContext of the element is not set to this instance.
public static DependencyProperty,System.Windows TargetWithoutContextProperty
return System.Windows.DependencyProperty