# TextControl.PointToDocument Method

> Converts a Point that represents the current coordinate system of the TextControl into a point in document coordinates, which are in twips relative to the top-left corner of the whole document.

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

---

### Description

Converts a Point that represents the current coordinate system of the TextControl into a point in document coordinates, which are in twips relative to the top-left corner of the whole document.

### Syntax

```csharp
public Point PointToDocument(Point point);
```

```vbnet
Public Function PointToDocument(point As Point) As Point
```

### Parameters

| Parameter | Description |
|---|---|
| point | Specifies a point that represents the current coordinate system of the TextControl. |

### Return Value

The return value specifies the converted Point in document coordinates.

### Examples

The following example uses Point To Document in a focused Text Control workflow.

```csharp
var result = textControl.PointToDocument(new System.Windows.Point(20, 20));
Console.WriteLine($"Point To Document result: {result}");
```

```vbnet
Dim result = textControl.PointToDocument(New System.Windows.Point(20, 20))
Console.WriteLine($"Point To Document result: {result}")
```

---

## Nearby

- **Previous:** [TextControl.PointFromDocument Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/pointfromdocument-method/llms-full.txt)
- **Next:** [TextControl.Print Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/print-method/llms-full.txt)
