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