Class AsyncCommand
Assembly: Sdk.dll
Syntax
public class AsyncCommand : ICommand
Constructors
|
Edit this page
View Source
AsyncCommand(Func<Task>)
Declaration
public AsyncCommand(Func<Task> execute)
Parameters
Type |
Name |
Description |
Func<Task> |
execute |
|
|
Edit this page
View Source
AsyncCommand(Func<Task>, Func<bool>)
Declaration
public AsyncCommand(Func<Task> execute, Func<bool> canExecute)
Parameters
Methods
|
Edit this page
View Source
CanExecute(object)
Defines the method that determines whether the command can execute in its current state.
Declaration
public bool CanExecute(object parameter)
Parameters
Type |
Name |
Description |
object |
parameter |
Data used by the command. If the command does not require data to be passed, this object can be set to null.
|
Returns
Type |
Description |
bool |
true if this command can be executed; otherwise, false.
|
|
Edit this page
View Source
Execute(object)
Defines the method to be called when the command is invoked.
Declaration
public void Execute(object parameter)
Parameters
Type |
Name |
Description |
object |
parameter |
Data used by the command. If the command does not require data to be passed, this object can be set to null.
|
|
Edit this page
View Source
NotifyCanExecuteChanged()
Declaration
public void NotifyCanExecuteChanged()
Events
|
Edit this page
View Source
CanExecuteChanged
Occurs when changes occur that affect whether or not the command should execute.
Declaration
public event EventHandler CanExecuteChanged
Event Type
Implements