Table of Contents

Class InvokeCommandAction

Namespace
HeBianGu.Base.WpfBase
Assembly
HeBianGu.Base.WpfBase.dll

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

DependencyProperty

CommandProperty

public static readonly DependencyProperty CommandProperty

Field Value

DependencyProperty

EventArgsConverterParameterProperty

public static readonly DependencyProperty EventArgsConverterParameterProperty

Field Value

DependencyProperty

EventArgsConverterProperty

public static readonly DependencyProperty EventArgsConverterProperty

Field Value

DependencyProperty

EventArgsParameterPathProperty

public static readonly DependencyProperty EventArgsParameterPathProperty

Field Value

DependencyProperty

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

IValueConverter

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

object

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

string

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

bool

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 object

The parameter to the action. If the action does not require a parameter, the parameter may be set to a null reference.