# DocumentTarget.ScrollTo Method

> Sets the current text input position to the target's position and scrolls it into the visible part of the document.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Method
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > DocumentTarget.ScrollTo Method
- **433 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documenttarget/scrollto-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documenttarget/scrollto-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documenttarget/scrollto-method/llms-full.txt

---

### Description

Sets the current text input position to the target's position and scrolls it into the visible part of the document.

### Syntax

```csharp
public bool ScrollTo();
```

```vbnet
Public Function ScrollTo() As Boolean
```

### Return Value

The return value is true, if the target has been scrolled into the visible part of the document. Otherwise it is false.

### Examples

The following example creates a named destination for an internal document link by using `DocumentTarget.ScrollTo`.

```csharp
DocumentTarget documentTarget = new("CustomerDetails");
textControl.DocumentTargets.Add(documentTarget);

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

```vbnet
Dim documentTarget As New DocumentTarget("CustomerDetails")
textControl.DocumentTargets.Add(documentTarget)

If documentTarget.ScrollTo() Then
    Console.WriteLine("Scroll To completed successfully.")
End If
```

---

## Nearby

- **Previous:** [DocumentTarget.Name Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documenttarget/name-property/llms-full.txt)
- **Next:** [DocumentTarget.Start Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documenttarget/start-property/llms-full.txt)
