New to Telerik UI for WinForms? Start a free 30-day trial

ICommand

Interface

Defines the availability, execution, and availability-change contract for a diagram command.

Definition

Namespace:Telerik.WinControls.Diagram.Input

Assembly:Telerik.WinControls.RadDiagram.dll

Syntax:

C#
public interface ICommand

Methods

Determines whether the implementation can execute with the supplied parameter.

C#
bool CanExecute(object parameter)
Parameters:parameterobject

Command-specific data used for the availability check.

Returns:

bool

true when the command can execute.

Executes the command with the supplied parameter.

C#
void Execute(object parameter)
Parameters:parameterobject

Command-specific data passed to the implementation.

Events

Occurs when the command's ability to execute may have changed.

C#
event EventHandler CanExecuteChanged