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