TX Text Control .NET for WPF

ScrollTo Method

Method
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 beginning of a text field and scrolls it into the visible part of the document.

Syntax

public bool ScrollTo();

Return Value

The return value is true, if the text field could be scrolled. Otherwise it is false.

Examples

The following example inserts a Word-compatible text field into a template by using TextField.ScrollTo.

TextField textField = new ApplicationField(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer name", new[] { "CustomerName" });
textControl.TextFields.Add(textField);

if (textField.ScrollTo())
{
    Console.WriteLine("Scroll To completed successfully.");
}