TX Text Control .NET Server

TrackedChange Class

Class|Introduced in 26.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.Core.dll
Install
dotnet add package TXTextControl.TextControl.Core.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.dll from the setup.
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.dll

Description

A TrackedChange object represents a change made to the document after anyone has revised the document. After tracking changes has been turned on with the IsTrackChangesEnabled property, a TextControl marks up new changes made to the document. Every change is represented through a TrackedChange object, all of these objects are contained in the TrackedChangeCollection which can be obtained with the TrackedChanges property.

Syntax

public class TrackedChange

Examples

The following example processes the currently selected tracked change in a reviewed document.

TrackedChange trackedChange = textControl.TrackedChanges.GetItem();
trackedChange?.ScrollTo();

Members

Properties

PropertyDescription
ActiveGets or sets a value specifying whether the TrackedChange is currently active or not. An inactive TrackedChange is not highlighted and is not retrieved through the TrackedChangeCollection.GetItem method. When the state changes from active to inactive or vise versa, a TrackedChangeStateChanged event occurs.
ChangeKindGets the kind of change. It can be inserted or deleted text or an inserted or deleted image, textframe, barcode or form.
ChangeTimeGets the date and time when the change has been made. The time is a Coordinated Universal Time (UTC).
DefaultHighlightColorGets the default highlight color of a tracked change. This color is used for changes made through the current user. The current user is the first string set with the TextControl.UserNames property. This color is also used for changes made through an unknown user.
HighlightColorGets or sets the highlight color for the tracked change. If the highlight color is TrackedChange.DefaultHighlightColor and the change has been made through an user who is not the current user, the highlight color is set to a color depending on the user name. The current user is the first string set with the TextControl.UserNames property.
HighlightModeGets or sets a value indicating whether the tracked change is highlighted.
LengthGets the number of changed characters.
NumberGets the change's number. The first tracked change has the number 1. The number is defined through the textflow. A change with a smaller start position has a smaller number.
StartGets the index (one-based) of the first changed character.
TextGets the changed text.
UserNameGets the name of the user who has changed the document. This parameter can be null or an empty string to indicate, that an unknown user has changed the document.

Methods

MethodDescription
SaveSaves the changed text with the specified format.
ScrollToSets the current input position to the first position of the changed text and scrolls it into the visible part of the document.
SelectSelects the changed part of the document.