New to Telerik UI for WinFormsStart a free 30-day trial

The service handling the undo-redo stack.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.WinControls.RadDiagram.dll

Syntax:

C#
public interface IUndoRedoService

Derived Classes: UndoRedoService

Properties

Gets the is active property.

C#
bool IsActive { get; }
Property Value:

Determines whether the undoRedo service is executing undo or redo action at the moment.

Gets or sets the size of the redo buffer.

C#
int RedoBufferSize { get; set; }
Property Value:

The size of the redo buffer.

RedoStack

IEnumerable<ICommand>

Gets the redo stack.

C#
IEnumerable<ICommand> RedoStack { get; }

Gets or sets the size of the undo buffer.

C#
int UndoBufferSize { get; set; }
Property Value:

The size of the undo buffer.

UndoStack

IEnumerable<ICommand>

Gets the undo stack.

C#
IEnumerable<ICommand> UndoStack { get; }

Methods

Adds the given command without executing it.

C#
void AddCommand(ICommand command)
Parameters:commandICommand

The command to add.

Determines whether this instance can redo.

C#
bool CanRedo()
Returns:

bool

true if this instance can redo; otherwise, false.

Determines whether this instance can undo.

C#
bool CanUndo()
Returns:

bool

true if this instance can undo; otherwise, false.

Clears the undo and redo stacks.

C#
void Clear()

Executes the command.

C#
void ExecuteCommand(ICommand command, object state = null)
Parameters:commandICommand

The command.

stateobject

The state.

Redoes this instance.

C#
void Redo()

Removes the command.

C#
void RemoveCommand(ICommand command)
Parameters:commandICommand

The command.

Undoes this instance.

C#
void Undo(object state = null)
Parameters:stateobject

Events

C#
event EventHandler<CommandEventArgs> ActionExecuted