Class InvokeCommandAction
Executes a specified ICommand when invoked.
public sealed class InvokeCommandAction : TriggerAction<DependencyObject>, IAnimatable, IAttachedObject
- Inheritance
-
InvokeCommandAction
- Implements
- Inherited Members
- Extension Methods
Fields
CommandParameterProperty
public static readonly DependencyProperty CommandParameterProperty
Field Value
CommandProperty
public static readonly DependencyProperty CommandProperty
Field Value
EventArgsConverterParameterProperty
public static readonly DependencyProperty EventArgsConverterParameterProperty
Field Value
EventArgsConverterProperty
public static readonly DependencyProperty EventArgsConverterProperty
Field Value
EventArgsParameterPathProperty
public static readonly DependencyProperty EventArgsParameterPathProperty
Field Value
Properties
Command
Gets or sets the command this action should invoke. This is a dependency property.
public ICommand Command { get; set; }
Property Value
- ICommand
The command to execute.
Remarks
This property will take precedence over the CommandName property if both are set.
CommandName
Gets or sets the name of the command this action should invoke.
public string CommandName { get; set; }
Property Value
- string
The name of the command this action should invoke.
Remarks
This property will be superseded by the Command property if both are set.
CommandParameter
Gets or sets the command parameter. This is a dependency property.
public object CommandParameter { get; set; }
Property Value
- object
The command parameter.
Remarks
This is the value passed to ICommand.CanExecute and ICommand.Execute.
EventArgsConverter
Gets or sets the IValueConverter that is used to convert the EventArgs passed to the Command as a parameter.
public IValueConverter EventArgsConverter { get; set; }
Property Value
Remarks
If the Command or EventArgsParameterPath properties are set, this property is ignored.
EventArgsConverterParameter
Gets or sets the parameter that is passed to the EventArgsConverter.
public object EventArgsConverterParameter { get; set; }
Property Value
EventArgsParameterPath
Gets or sets the parameter path used to extract a value from an EventArgs property to pass to the Command as a parameter.
public string EventArgsParameterPath { get; set; }
Property Value
Remarks
If the Command propert is set, this property is ignored.
PassEventArgsToCommand
Specifies whether the EventArgs of the event that triggered this action should be passed to the Command as a parameter.
public bool PassEventArgsToCommand { get; set; }
Property Value
Remarks
If the Command, EventArgsParameterPath, or EventArgsConverter properties are set, this property is ignored.
Methods
Invoke(object)
Invokes the action.
protected override void Invoke(object parameter)
Parameters
parameter
objectThe parameter to the action. If the action does not require a parameter, the parameter may be set to a null reference.