skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class DocumentHistory

Represents the history for a RadDocument.

Inheritance
System.Object
DocumentHistory
Namespace: Telerik.Windows.Documents.History
Assembly: Telerik.Windows.Controls.RichTextBox.dll

Syntax

public class DocumentHistory : Object

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

true if this instance can redo; otherwise, false.

CanUndo

Gets a value indicating whether undo operation can be exexuted.

Declaration
public bool CanUndo { get; }
Property Value
System.Boolean

true if this instance can undo; otherwise, false.

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

true if the history is enabled; otherwise, false.

IsInUndoGroup

Gets a value indicating whether an undo group has been started.

Declaration
public bool IsInUndoGroup { get; }
Property Value
System.Boolean

true if this instance is in undo group; otherwise, false.

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.

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.