TX Text Control .NET for WPF

ScrollTo Method

Method|Introduced in 26.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Sets the current input position to the first position of the changed text and scrolls it into the visible part of the document.

Syntax

ScrollTo()

Scrolls the beginning of the tracked change into the visible part of the document using a default position depending on the previous position.

public bool ScrollTo();

ScrollTo(InputPosition.ScrollPosition)

Scrolls the beginning of the tracked change into the visible part of the document using the specified position.

public bool ScrollTo(InputPosition.ScrollPosition position);
ParameterDescription
position

Specifies an InputPosition.ScrollPosition value.

Return Value

The return value is true, if the document has been scrolled. Otherwise it is false.

Examples

The following example scrolls the next tracked change into view.

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