# IFormattedText.TablesOfContents Property

> Gets a collection of all tables of contents. The property's value is an object of the type TableOfContentsCollection.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 29.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 > IFormattedText.TablesOfContents Property
- **461 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/iformattedtext/tablesofcontents-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/iformattedtext/tablesofcontents-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/iformattedtext/tablesofcontents-property/llms-full.txt

---

### Description

Gets a collection of all tables of contents. The property's value is an object of the type [TableOfContentsCollection](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tableofcontentscollection/llms-full.txt).

### Syntax

```csharp
TableOfContentsCollection TablesOfContents { get; }
```

```vbnet
ReadOnly Property TablesOfContents As TableOfContentsCollection
```

### Examples

The following example applies bold formatting through the iformatted text's selection by using `IFormattedText.TablesOfContents`.

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

foreach (TableOfContents tableOfContents in iFormattedText.TablesOfContents)
{
    tableOfContents.Name = "CustomerName";
}
```

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

For Each tableOfContents As TableOfContents In iFormattedText.TablesOfContents
    tableOfContents.Name = "CustomerName"
Next
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [IFormattedText.Tables Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/iformattedtext/tables-property/llms-full.txt)
- **Next:** [IFormattedText.TextChars Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/iformattedtext/textchars-property/llms-full.txt)
