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

Associates an ICommand with handlers used by diagram command processing.

Definition

Namespace:Telerik.WinControls.Diagram.Input

Assembly:Telerik.WinControls.RadDiagram.dll

Syntax:

C#
public class CommandBinding

Inheritance: objectCommandBinding

Constructors

Initializes a new instance of this command binding.

C#
public CommandBinding()

Initializes a command binding for the specified command and subscribes the supplied handlers when they are non-null.

C#
public CommandBinding(ICommand command, ExecutedRoutedEventHandler executed, CanExecuteRoutedEventHandler canExecute)
Parameters:commandICommand

The command associated with this binding.

executedExecutedRoutedEventHandler

The handler subscribed to the Executed event.

canExecuteCanExecuteRoutedEventHandler

The handler subscribed to the CanExecute event.

Exceptions: ArgumentNullException

command is null.

Initializes a command binding for the specified command and subscribes the executed handler when it is non-null.

C#
public CommandBinding(ICommand command, ExecutedRoutedEventHandler executed)
Parameters:commandICommand

The command associated with this binding.

executedExecutedRoutedEventHandler

The handler subscribed to the Executed event.

Exceptions: ArgumentNullException

command is null.

Initializes a command binding for the specified command.

C#
public CommandBinding(ICommand command)
Parameters:commandICommand

The command associated with this binding.

Exceptions: ArgumentNullException

command is null.

Properties

Gets the command whose execution and availability are handled by this binding.

C#
public ICommand Command { get; set; }
Exceptions: ArgumentNullException

The assigned value is null.

Events

Occurs when diagram command processing checks whether the associated command can execute.

C#
public event CanExecuteRoutedEventHandler CanExecute

Occurs when diagram command processing executes the associated command.

C#
public event ExecutedRoutedEventHandler Executed