Edit

Share via


IAsyncRelayCommandExtensions.CreateCancelCommand(IAsyncRelayCommand) Method

Definition

Creates an ICommand instance that can be used to cancel execution on the input command. The returned command will also notify when it can be executed based on the state of the wrapped command.

public static System.Windows.Input.ICommand CreateCancelCommand(this CommunityToolkit.Mvvm.Input.IAsyncRelayCommand command);
static member CreateCancelCommand : CommunityToolkit.Mvvm.Input.IAsyncRelayCommand -> System.Windows.Input.ICommand
<Extension()>
Public Function CreateCancelCommand (command As IAsyncRelayCommand) As ICommand

Parameters

command
IAsyncRelayCommand

The input IAsyncRelayCommand instance to create a cancellation command for.

Returns

An ICommand instance that can be used to monitor and signal cancellation for command.

Exceptions

Thrown if command is null.

Remarks

The returned instance is not guaranteed to be unique across multiple invocations with the same arguments.

Applies to