TrackedChange Class
- Namespace
TXTextControl
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. WPF. SDK
- Assembly
TXTextControl.dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. WPF. SDK TXTextControl.from the setup.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 TrackedChangePublic Class TrackedChangeExamples
The following example processes the currently selected tracked change in a reviewed document.
TrackedChange trackedChange = textControl.TrackedChanges.GetItem();
trackedChange?.ScrollTo();Dim trackedChange As TrackedChange = textControl.TrackedChanges.GetItem()
If trackedChange IsNot Nothing Then trackedChange.ScrollTo()Members
Properties
| Property | Description |
|---|---|
| Active | Gets 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. |
| ChangeKind | Gets the kind of change. It can be inserted or deleted text or an inserted or deleted image, textframe, barcode or form. |
| ChangeTime | Gets the date and time when the change has been made. The time is a Coordinated Universal Time (UTC). |
| DefaultHighlightColor | Gets 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. |
| HighlightColor | Gets 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. |
| HighlightMode | Gets or sets a value indicating whether the tracked change is highlighted. |
| Length | Gets the number of changed characters. |
| Number | Gets 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. |
| Start | Gets the index (one-based) of the first changed character. |
| Text | Gets the changed text. |
| UserName | Gets 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. |