# HeaderFooter.Lines Property

> Gets a collection of all text lines the header or footer contains. The property value is an object of the type LineCollection.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 10.1
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.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 Server > Reference > TXTextControl > HeaderFooter.Lines Property
- **582 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/headerfooter/lines-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/headerfooter/lines-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/headerfooter/lines-property/llms-full.txt

---

### Description

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

### Syntax

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

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

### Examples

The following example creates a header for the first section and configures its content or layout by using `HeaderFooter.Lines`.

```csharp
HeaderFooterCollection headers = textControl.Sections[1].HeadersAndFooters;
headers.Add(HeaderFooterType.Header);
HeaderFooter headerFooter = headers.GetItem(HeaderFooterType.Header);
headerFooter.Selection.Text = "Quarterly report";

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

```vbnet
Dim headers As HeaderFooterCollection = textControl.Sections(1).HeadersAndFooters
headers.Add(HeaderFooterType.Header)
Dim headerFooter As HeaderFooter = headers.GetItem(HeaderFooterType.Header)
headerFooter.Selection.Text = "Quarterly report"

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

### Limitations

Read only.

---

## Nearby

- **Previous:** [HeaderFooter.Images Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/headerfooter/images-property/llms-full.txt)
- **Next:** [HeaderFooter.MisspelledWords Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/headerfooter/misspelledwords-property/llms-full.txt)
