New to Telerik UI for WPF? Start a free 30-day trial

Represents a history in the text document.

Definition

Namespace:Telerik.Windows.SyntaxEditor.Core.History

Assembly:Telerik.Windows.SyntaxEditor.Core.dll

Syntax:

C#
public class TextDocumentHistory

Inheritance: objectTextDocumentHistory

Constructors

Initializes a new instance of the TextDocumentHistory class.

C#
public TextDocumentHistory(TextDocument document)
Parameters:documentTextDocument

Properties

Gets a value indicating whether the history can be redone.

C#
public bool CanRedo { get; }

Gets a value indicating whether the history can be undone.

C#
public bool CanUndo { get; }

Gets or sets the depth of the history.

C#
public int Depth { get; set; }

Gets a value indicating whether this instance is in undo group.

C#
public bool IsInUndoGroup { get; }

Methods

Clears the undo/redo history stacks.

C#
public void Clear()

Called when record is executed.

C#
protected virtual void OnRecordExecuted(TextChangeHistoryAction historyAction, bool isMerged)
Parameters:historyActionTextChangeHistoryActionisMergedbool

Called when record is executing.

C#
protected virtual void OnRecordExecuting()

Called when action is redone.

C#
protected virtual void OnRedoExecuted(TextChangeHistoryAction historyAction)
Parameters:historyActionTextChangeHistoryAction

Called when action is being redone.

C#
protected virtual void OnRedoExecuting(TextChangeHistoryAction historyAction)
Parameters:historyActionTextChangeHistoryAction

Called when action is undone.

C#
protected virtual void OnUndoExecuted(TextChangeHistoryAction historyAction)
Parameters:historyActionTextChangeHistoryAction

Called when action is being undone.

C#
protected virtual void OnUndoExecuting(TextChangeHistoryAction historyAction)
Parameters:historyActionTextChangeHistoryAction

Performs a redo operation.

C#
public bool Redo()
Returns:

bool

Performs an undo operation.

C#
public bool Undo()
Returns:

bool