IAsyncRelayCommand.CanBeCanceled Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a value indicating whether a running operation for this command can currently be canceled.
public bool CanBeCanceled { get; }
member this.CanBeCanceled : bool
Public ReadOnly Property CanBeCanceled As Boolean
Property Value
Remarks
The exact sequence of events that types implementing this interface should raise is as follows:
- The command is initially not running: IsRunning, CanBeCanceled and IsCancellationRequested are
false. - The command starts running: IsRunning and CanBeCanceled switch to
true. IsCancellationRequested is set tofalse. - If the operation is canceled: CanBeCanceled switches to
falseand IsCancellationRequested switches totrue. - The operation completes: IsRunning and CanBeCanceled switch to
false. The state of IsCancellationRequested is undefined.
false regardless of the current state of the command.