DocumentHistory
Represents the history for a RadDocument.
Definition
Namespace:Telerik.WinForms.Documents.History
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class DocumentHistory
Inheritance: objectDocumentHistory
Constructors
Initializes a new instance of the DocumentHistory class.
public DocumentHistory(RadDocument document)
The document to track the history for.
Fields
The default maximum number of records in the history stack.
public const int DefaultDepth = 1000
Properties
Gets a value indicating whether redo operation can be exexuted.
public bool CanRedo { get; }
true if this instance can redo; otherwise, false.
Gets a value indicating whether undo operation can be exexuted.
public bool CanUndo { get; }
true if this instance can undo; otherwise, false.
Gets or sets a value indicating whether the history for a RadDocument is enabled.
public bool IsEnabled { get; set; }
true if the history is enabled; otherwise, false.
Gets a value indicating whether an undo group has been started.
public bool IsInUndoGroup { get; }
true if this instance is in undo group; otherwise, false.
Methods
Begins a new group of undoable actions.
public void BeginUndoGroup()
Cancels the undo group that has been started using BeginUndoGroup().
public void CancelUndoGroup()
Clears the history.
public void Clear()
Cannot clear the history while in undo group.
Ends an already opened through BeginUndoGroup() group.
public void EndUndoGroup(string actionDisplayText)
The text that will be displayed for this undo group.
Gets the last commands in the history.
public List<MultipleUndoPoint> GetLastUndoCommands(int numberOfCommands)
The number of commands.
Returns:List<MultipleUndoPoint>
A list containing the last commands.
Reverts the document to its state before the last undo operation.
public bool Redo()
A value indicating whether the redo operation passed successfully.
Exceptions:Cannot Redo while in begin undo group.
Reverts the document state before the last modification.
public bool Undo()
A boolean value determinig whether the undo operation passed successfuly.
Exceptions:Cannot Undo while in begin undo group.