TX Text Control .NET for WPF

ScrollTo Method

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

Description

Scrolls the contents of a Text Control so that the current input position becomes visible.

Syntax

ScrollTo()

Scrolls the current input position into the visible part of the document using a default position depending on the previous position.

public void ScrollTo();

ScrollTo(InputPosition.ScrollPosition)

Scrolls the current input position into the visible part of the document using the specified position.

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

Specifies an InputPosition.ScrollPosition value.

Examples

The following example examines or changes the insertion point in a short document by using InputPosition.ScrollTo.

textControl.Text = "Project summary";
InputPosition inputPosition = textControl.InputPosition;

inputPosition.ScrollTo(InputPosition.ScrollPosition.Auto);
Console.WriteLine("Input Position is ready for use.");