# Line.TextBounds Property

> Gets the bounding rectangle of the text belonging to the line. The values are given in twips with an origin at the upper left corner of the document. The relationship between the upper left corner of the document and the upper left corner of the visible portion of the document can be obtained with the TextControl.ScrollLocation property.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 10.1
- **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 > Line.TextBounds Property
- **470 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/line/textbounds-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/line/textbounds-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/line/textbounds-property/llms-full.txt

---

### Description

Gets the bounding rectangle of the text belonging to the line. The values are given in twips with an origin at the upper left corner of the document. The relationship between the upper left corner of the document and the upper left corner of the visible portion of the document can be obtained with the [TextControl.ScrollLocation](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/scrolllocation-property/llms-full.txt) property.

### Syntax

```csharp
public Rectangle TextBounds { get; }
```

```vbnet
Public ReadOnly Property TextBounds As Rectangle
```

### Examples

The following example examines the first line in a short document by using `Line.TextBounds`.

```csharp
textControl.Text = "Quarterly results\nRevenue increased by 12%.";
Line line = textControl.Lines[1];

Console.WriteLine($"Text Bounds: {line.TextBounds}");
Console.WriteLine("Line is ready for use.");
```

```vbnet
textControl.Text = "Quarterly results" & vbCrLf & "Revenue increased by 12%."
Dim line As Line = textControl.Lines(1)

Console.WriteLine($"Text Bounds: {line.TextBounds}")
Console.WriteLine("Line is ready for use.")
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [Line.Text Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/line/text-property/llms-full.txt)
- **Next:** [LineCollection Class](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/linecollection/llms-full.txt)
