Interface
IUndoRedoService

The service handling the undo-redo stack.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.Windows.Diagrams.Core.dll

Syntax:

cs-api-definition
public interface IUndoRedoService

Properties

IsActive

Gets the is active property.

Declaration

cs-api-definition
bool IsActive { get; }

Property Value

bool

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

RedoBufferSize

Gets or sets the size of the redo buffer.

Declaration

cs-api-definition
int RedoBufferSize { get; set; }

Property Value

int

The size of the redo buffer.

RedoStack

Gets the redo stack.

Declaration

cs-api-definition
IEnumerable<ICommand> RedoStack { get; }

Property Value

IEnumerable<ICommand>

UndoBufferSize

Gets or sets the size of the undo buffer.

Declaration

cs-api-definition
int UndoBufferSize { get; set; }

Property Value

int

The size of the undo buffer.

UndoStack

Gets the undo stack.

Declaration

cs-api-definition
IEnumerable<ICommand> UndoStack { get; }

Property Value

IEnumerable<ICommand>

Methods

AddCommand(ICommand)

Adds the given command without executing it.

Declaration

cs-api-definition
void AddCommand(ICommand command)

Parameters

command

ICommand

The command to add.

CanRedo()

Determines whether this instance can redo.

Declaration

cs-api-definition
bool CanRedo()

Returns

bool

true if this instance can redo; otherwise, false.

CanUndo()

Determines whether this instance can undo.

Declaration

cs-api-definition
bool CanUndo()

Returns

bool

true if this instance can undo; otherwise, false.

Clear()

Clears the undo and redo stacks.

Declaration

cs-api-definition
void Clear()

ExecuteCommand(ICommand, object)

Executes the command.

Declaration

cs-api-definition
void ExecuteCommand(ICommand command, object state = null)

Parameters

command

ICommand

The command.

state

object

The state.

Redo()

Redoes this instance.

Declaration

cs-api-definition
void Redo()

RemoveCommand(ICommand)

Removes the command.

Declaration

cs-api-definition
void RemoveCommand(ICommand command)

Parameters

command

ICommand

The command.

Undo(object)

Undoes this instance.

Declaration

cs-api-definition
void Undo(object state = null)

Parameters

state

object

Events

ActionExecuted

Declaration

cs-api-definition
event EventHandler<CommandEventArgs> ActionExecuted

Event Value

EventHandler<CommandEventArgs>