Class CallMethodAction
An action that calls a method on a specified object when invoked.
Implements
Inherited Members
Namespace: EmptyKeys.UserInterface.Interactions.Core
Assembly: EmptyKeys.UserInterface.dll
Syntax
public sealed class CallMethodAction : DependencyObject, IAction
Fields
MethodNameProperty
The method name property
Declaration
public static readonly DependencyProperty MethodNameProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
TargetObjectProperty
The target object property
Declaration
public static readonly DependencyProperty TargetObjectProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
MethodName
Gets or sets the name of the method to invoke. This is a dependency property.
Declaration
public string MethodName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name of the method. |
TargetObject
Gets or sets the object that exposes the method of interest. This is a dependency property.
Declaration
public object TargetObject { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The target object. |
Methods
Execute(Object, Object)
Executes the action.
Declaration
public object Execute(object sender, object parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The System.Object that is passed to the action by the behavior. Generally this is AssociatedObject or a target object. |
System.Object | parameter | The value of this parameter is determined by the caller. |
Returns
Type | Description |
---|---|
System.Object | True if the method is called; else false. |
Remarks
An example of parameter usage is EventTriggerBehavior, which passes the EventArgs as a parameter to its actions.
Exceptions
Type | Condition |
---|---|
System.ArgumentException |