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

Associates an ICommand with callback events for execution and availability.

Callbacks can be subscribed through the events, but the current binding implementation does not raise them.

Definition

Namespace:Telerik.WinForms.Documents.RichTextBoxCommands

Assembly:Telerik.WinControls.RadSpreadsheet.dll

Syntax:

C#
public class CommandBinding

Inheritance: objectCommandBinding

Constructors

Initializes an empty binding; set Command before using it.

C#
public CommandBinding()

Initializes a binding for the specified command and subscribes execution and availability callbacks.

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

The command to associate with the binding.

executedExecutedRoutedEventHandler

The callback to subscribe to Executed.

canExecuteCanExecuteRoutedEventHandler

The callback to subscribe to CanExecute.

Exceptions: ArgumentNullException

command is null.

Initializes a binding for the specified command and subscribes an execution callback.

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

The command to associate with the binding.

executedExecutedRoutedEventHandler

The callback to subscribe to Executed.

Exceptions: ArgumentNullException

command is null.

Initializes a binding for the specified command.

C#
public CommandBinding(ICommand command)
Parameters:commandICommand

The command to associate with the binding.

Exceptions: ArgumentNullException

command is null.

Properties

Gets or sets the command associated with this binding.

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

The assigned command is null.

Events

Declares the callback event for command-availability queries; this implementation does not raise it.

C#
public event CanExecuteRoutedEventHandler CanExecute

Declares the callback event for command execution; this implementation does not raise it.

C#
public event ExecutedRoutedEventHandler Executed

Declares the preview callback event for command-availability queries; this implementation does not raise it.

C#
public event CanExecuteRoutedEventHandler PreviewCanExecute

Declares the preview callback event for command execution; this implementation does not raise it.

C#
public event ExecutedRoutedEventHandler PreviewExecuted