CommandBinding
Associates an ICommand with execution and availability callbacks.
The internal callback methods invoke their corresponding events directly; calling them without a subscriber throws NullReferenceException.
Definition
Namespace:Telerik.WinControls.UI.Utilities.PlatformSpecific
Assembly:Telerik.WinControls.RadSpreadsheet.dll
Syntax:
public class CommandBinding
Inheritance: objectCommandBinding
Constructors
Initializes an empty binding; set Command before using it.
public CommandBinding()
Initializes a binding for the specified command and subscribes execution and availability callbacks.
public CommandBinding(ICommand command, ExecutedRoutedEventHandler executed, CanExecuteRoutedEventHandler canExecute)
The command to associate with the binding.
executedExecutedRoutedEventHandlerThe callback to subscribe to Executed.
canExecuteCanExecuteRoutedEventHandlerThe callback to subscribe to CanExecute.
Exceptions: ArgumentNullExceptioncommand is null.
Initializes a binding for the specified command and subscribes an execution callback.
public CommandBinding(ICommand command, ExecutedRoutedEventHandler executed)
The command to associate with the binding.
executedExecutedRoutedEventHandlerThe callback to subscribe to Executed.
Exceptions: ArgumentNullExceptioncommand is null.
Initializes a binding for the specified command.
public CommandBinding(ICommand command)
The command to associate with the binding.
Exceptions: ArgumentNullExceptioncommand is null.
Properties
Gets or sets the command associated with this binding.
public ICommand Command { get; set; }
The assigned command is null.
Events
Occurs when the command associated with this CommandBinding is checked for availability on the command target.
public event CanExecuteRoutedEventHandler CanExecute
Occurs when the command associated with this CommandBinding executes.
public event ExecutedRoutedEventHandler Executed