In This Article

ICommand Interface

Defines a command.

public interface ICommand

Methods

CanExecute(object?)

Returns whether the command can execute.

bool CanExecute(object? parameter)
Parameter Type Description
parameter object

The parameter to examine.

Returns

bool:

true if the command can execute; otherwise, false.

Execute(object?)

Executes the command.

void Execute(object? parameter)
Parameter Type Description
parameter object

The parameter to examine.

Events

CanExecuteChanged

Occurs after the can-execute state has changed.

event EventHandler CanExecuteChanged

Event Type

EventHandler

Extension Methods