ClassDelegateCommand
Class
Provides a simple ICommand implementation.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.dll
Syntax:
cs-api-definition
public class DelegateCommand : ICommand
Inheritance: objectDelegateCommand
Implements:
Constructors
DelegateCommand(Action<object>)
Initializes a new instance of the DelegateCommand class.
DelegateCommand(Action<object>, Predicate<object>)
Initializes a new instance of the DelegateCommand class.
Methods
CanExecute(object)
Defines the method that determines whether the command can execute in its current state.
Execute(object)
Defines the method to be called when the command is invoked.
Declaration
cs-api-definition
public void Execute(object parameter)
Parameters
parameter
Data used by the command. If the command does not require data to be passed, this object can be set to null.
Implements
InvalidateCanExecute()
Raises the CanExecuteChanged event.
Declaration
cs-api-definition
public void InvalidateCanExecute()
Events
CanExecuteChanged
Occurs when changes occur that affect whether the command should execute.
Declaration
cs-api-definition
public event EventHandler CanExecuteChanged
Event Value
Implements