ClassUndoableDelegateCommand
Class
Base class for undoable actions based on delegates.
Definition
Namespace:Telerik.Windows.Diagrams.Core
Assembly:Telerik.Windows.Diagrams.Core.dll
Syntax:
cs-api-definition
public class UndoableDelegateCommand : ICommand
Inheritance: objectUndoableDelegateCommand
Derived Classes:
Implements:
Constructors
UndoableDelegateCommand(string, Action<object>, Action<object>, Predicate<object>)
Initializes a new instance of the UndoableDelegateCommand class.
Declaration
cs-api-definition
public UndoableDelegateCommand(string name, Action<object> execute, Action<object> undo = null, Predicate<object> canExecute = null)
Parameters
name
The name or title of the command.
execute
The redo or execute method.
undo
The undo or rollback method.
canExecute
The method returning whether the command can be executed.
Properties
Methods
CanExecute(object)
Gets a value indicating whether this command can be executed.
Execute(object)
Executes an undoable action.
Declaration
cs-api-definition
public virtual void Execute(object state = null)
Parameters
state
Implements
Redo()
Executes an undoable action.
Declaration
cs-api-definition
public virtual void Redo()
Implements
Undo(object)
Unwinds an undoable action.
Declaration
cs-api-definition
public virtual void Undo(object state = null)
Parameters
state
Implements