# TextFrame.Lines Property

> Gets a collection of all text lines contained in a text frame. The property value is an object of the type LineCollection.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 12.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.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 Windows Forms > Reference > TXTextControl > TextFrame.Lines Property
- **445 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textframe/lines-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textframe/lines-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textframe/lines-property/llms-full.txt

---

### Description

Gets a collection of all text lines contained in a text frame. The property value is an object of the type [LineCollection](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/linecollection/llms-full.txt).

### Syntax

```csharp
public LineCollection Lines { get; }
```

```vbnet
Public ReadOnly Property Lines As LineCollection
```

### Examples

The following example applies bold formatting through the text frame's selection by using `TextFrame.Lines`.

```csharp
Selection formattedSelection = textFrame.Selection;
formattedSelection.Bold = true;
textFrame.Selection = formattedSelection;

foreach (Line line in textFrame.Lines)
{
    Console.WriteLine(line.Baseline);
}
```

```vbnet
Dim formattedSelection As Selection = textFrame.Selection
formattedSelection.Bold = True
textFrame.Selection = formattedSelection

For Each line As Line In textFrame.Lines
    Console.WriteLine(line.Baseline)
Next
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [TextFrame.InternalMargins Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textframe/internalmargins-property/llms-full.txt)
- **Next:** [TextFrame.MisspelledWords Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textframe/misspelledwords-property/llms-full.txt)
