# HeaderFooter.TextChars Property

> Gets a collection of all characters the header or footer contains. The property value is an object of the type TextCharCollection.

- **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 > HeaderFooter.TextChars Property
- **592 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/textchars-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/textchars-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/textchars-property/llms-full.txt

---

### Description

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

### Syntax

```csharp
public TextCharCollection TextChars { get; }
```

```vbnet
Public ReadOnly Property TextChars As TextCharCollection
```

### Examples

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

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

foreach (TextChar textChar in headerFooter.TextChars)
{
    Console.WriteLine(textChar.Number);
}
```

```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 textChar As TextChar In headerFooter.TextChars
    Console.WriteLine(textChar.Number)
Next
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [HeaderFooter.TablesOfContents Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/tablesofcontents-property/llms-full.txt)
- **Next:** [HeaderFooter.TextFields Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/textfields-property/llms-full.txt)
