# TextFrame.TextChars Property

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

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 12.0
- **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 > TextFrame.TextChars Property
- **455 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textframe/textchars-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textframe/textchars-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textframe/textchars-property/llms-full.txt

---

### Description

Gets a collection of all characters contained in a text frame. 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 applies bold formatting through the text frame's selection by using `TextFrame.TextChars`.

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

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

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

For Each textChar As TextChar In textFrame.TextChars
    Console.WriteLine(textChar.Number)
Next
```

### Limitations

Read only.

---

## Nearby

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