ClassUndoRedoService
Service managing the undo redo actions.
Definition
Namespace:Telerik.Windows.Diagrams.Core
Assembly:Telerik.Windows.Diagrams.Core.dll
Syntax:
public class UndoRedoService : IUndoRedoService
Inheritance: objectUndoRedoService
Implements:
Constructors
UndoRedoService()
Initializes a new instance of the UndoRedoService class.
Declaration
public UndoRedoService()
Properties
IsActive
Gets the is active property.
Declaration
public bool IsActive { get; }
Property Value
Determines whether the undoRedo service is executing undo or redo action at the moment.
Implements
RedoBufferSize
Gets or sets the size of the redo buffer. Must be non-negative integer.
Declaration
public int RedoBufferSize { get; set; }
Property Value
The size of the redo buffer.
Implements
RedoStack
Gets the redo stack.
Declaration
public IEnumerable<ICommand> RedoStack { get; }
Property Value
Implements
UndoBufferSize
Gets or sets the size of the undo buffer. Must be non-negative integer.
Declaration
public int UndoBufferSize { get; set; }
Property Value
The size of the undo buffer.
Implements
UndoStack
Gets the undo stack.
Declaration
public IEnumerable<ICommand> UndoStack { get; }
Property Value
Implements
Methods
AddCommand(ICommand)
Adds the given command without executing it.
Declaration
public void AddCommand(ICommand command)
Parameters
command
The command to add.
Implements
CanRedo()
Determines whether this instance can redo.
Declaration
public bool CanRedo()
Returns
true if this instance can redo; otherwise, false.
Implements
CanUndo()
Determines whether this instance can undo.
Declaration
public bool CanUndo()
Returns
true if this instance can undo; otherwise, false.
Implements
Clear()
Clears the undo and redo stacks.
Declaration
public virtual void Clear()
Implements
ExecuteCommand(ICommand, object)
Executes the command.
OnActionExecuted(CommandEventArgs)
Raises the ActionExecuted event.
Declaration
protected virtual void OnActionExecuted(CommandEventArgs args)
Parameters
args
The CommandEventArgs instance containing the event data.
RemoveCommand(ICommand)
Removes the command.
Declaration
public void RemoveCommand(ICommand command)
Parameters
command
The command.
Implements
Undo(object)
Undoes this instance.
Declaration
public virtual void Undo(object state = null)
Parameters
state
Implements
Events
ActionExecuted
Occurs when either a do or an undo command is executed.
Declaration
public event EventHandler<CommandEventArgs> ActionExecuted
Event Value
Implements