Class UndoableDelegateCommand
Base class for undoable actions based on delegates.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Diagrams.Core
Assembly: Telerik.Windows.Diagrams.Core.dll
Syntax
public class UndoableDelegateCommand : ICommand
Constructors
UndoableDelegateCommand(String, Action<Object>, Action<Object>, Predicate<Object>)
Initializes a new instance of the UndoableDelegateCommand class.
Declaration
public UndoableDelegateCommand(string name, Action<object> execute, Action<object> undo = null, Predicate<object> canExecute = null)
Parameters
System.String
name
The name or title of the command. |
System.Action<System.Object>
execute
The redo or execute method. |
System.Action<System.Object>
undo
The undo or rollback method. |
System.Predicate<System.Object>
canExecute
The method returning whether the command can be executed. |
Properties
Name
Gets or sets the name.
Declaration
public string Name { get; set; }
Property Value
System.String
The name. |
Implements
Methods
CanExecute(Object)
Gets a value indicating whether this command can be executed.
Declaration
public virtual bool CanExecute(object state = null)
Parameters
System.Object
state
|
Returns
System.Boolean
|
Implements
Execute(Object)
Executes an undoable action.
Declaration
public virtual void Execute(object state = null)
Parameters
System.Object
state
|
Implements
Redo()
Undo(Object)
Unwinds an undoable action.
Declaration
public virtual void Undo(object state = null)
Parameters
System.Object
state
|