CommandHelper

Name Value
Assembly Catel.MVVM
Namespace Catel.MVVM
Available on .NET Framework 4.5, .NET Framework 4.6, Portable Class Libraries, Xamarin - Android, Xamarin - iOS
public static class CommandHelper

Helper class for the Command class.

Methods

CreateCommand(Action execute, Expression> validationSummaryPropertyExpression, object tag)

Creates a new Command that automatically determines whether it can be executed. It does this by checking the right validation summary, which should be in a property..

Parameters

Name Description
execute The action to execute when the command is being invoked.
validationSummaryPropertyExpression The validation summary property expression.
tag The tag for the command.

Returns

The created command.

Exceptions

Name Description
ArgumentNullException The execute isnull.

CreateCommand(Action execute, Expression> validationSummaryPropertyExpression, object tag)

Creates a new Missing: that automatically determines whether it can be executed. It does this by checking the right validation summary, which should be in a property..

Type Parameters

TExecuteParameter The type of the execute parameter.

Parameters

Name Description
execute The action to execute when the command is being invoked.
validationSummaryPropertyExpression The validation summary property expression.
tag The tag for the command.

Returns

The created command.

Exceptions

Name Description
ArgumentNullException The execute isnull.

CreateTaskCommand(Func execute, Expression> validationSummaryPropertyExpression, object tag)

Creates a new TaskCommand that automatically determines whether it can be executed. It does this by checking the right validation summary, which should be in a property..

Parameters

Name Description
execute The action to execute when the command is being invoked.
validationSummaryPropertyExpression The validation summary property expression.
tag The tag for the command.

Returns

The created command.

Exceptions

Name Description
ArgumentNullException The execute isnull.

CreateTaskCommand(Func execute, Expression> validationSummaryPropertyExpression, object tag)

Creates a new Missing: that automatically determines whether it can be executed. It does this by checking the right validation summary, which should be in a property..

Type Parameters

TExecuteParameter The type of the execute parameter.

Parameters

Name Description
execute The action to execute when the command is being invoked.
validationSummaryPropertyExpression The validation summary property expression.
tag The tag for the command.

Returns

The created command.

Exceptions

Name Description
ArgumentNullException The execute isnull.

Have a question about Catel? Use StackOverflow with the Catel tag!


Discussion