Version

Configuring Undo/Redo (xamRichTextEditor)

Topic Overview

Purpose

This topic explains how to turn on and off the xamRichTextEditor ™ control’s undo logging funtionality.

Required background

The following topics are prerequisites to understanding this topic:

Topic Purpose

This topic provides an overview of the features supported by the xamRichTextEditor control.

This topic explains the document’s content logical structure you can use to edit the contents in the xamRichTextEditor programmatically.

This topic provides detailed instructions to help you get up and running as quickly as possible with the xamRichTextEditor .

In this topic

This topic contains the following sections:

Introduction

Undo/Redo summary

The Undo/Redo feature logs all changes made to the document’s content by the user or in code. When you first create a document or load new content using the load method logging is off by default. It will turn on if one of these occur:

  • The user starts editing the document content thru an attached XamRichTextEditor control

  • The StartUndoLogging method on the document is invoked

If you invoke the StopUndoLogging method on the RichTextDocument this will clear all undo history and stop undo logging.

Undo Logging Configuration Summary

Undo/Redo configuration summary chart

The following table briefly explains the configurable aspects of the RichTextDocument and maps them to their specific properties.

Configurable aspect Details

Starts the undo logging.

Stops the undo logging and clear undo history.

Start Undo Logging

Overview

Start the undo logging programmatically by invoking the StartUndoLogging method.

Example

In C#:

this.xamRichTextEditor1.Document.StartUndoLogging();

Stop Undo Logging

Overview

You can stop undo logging by programmatically invoking the StopUndoLogging method. This will also clear the undo history.

Example

In C#:

this.xamRichTextEditor1.Document.StopUndoLogging();

Related Topics

The following topic provides additional information related to this topic.

Topic Purpose

This topic explains the xamRichTextEditor control’s Undo and Redo operations from a developer’s perspective.