• 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 jQuery UI for Angular UI for React UI for Vue UI for ASP.NET AJAX UI for ASP.NET MVC UI for ASP.NET Core UI for Blazor UI for Silverlight UI for PHP UI for JSP
    Mobile
    UI for .NET MAUI UI for Xamarin
    Document Management
    Telerik Document Processing
    Desktop
    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    CMS
    Sitefinity
    UI/UX Design
    Unite UX
    Debugging
    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Jam FiddlerCap FiddlerCore
    Extended Reality
    UI for Unity XR
    Free Tools
    JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Your Licenses
    • 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
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.Windows.Documents.History
Assembly: Telerik.Windows.Documents.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

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)

Was this article helpful?

Tell us how we can improve this article

Skip
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.