# Table of Contents Dialog

This dialog allows you to insert a table of contents in the document.

![An image showing the table of contents dialog of RadRichTextBox for WPF](https://www.telerik.com/products/wpf/documentation/assets/53b260d0b65bb3cf1be17158371dc6d8/richtextbox-dialogs-contents-table-0.png)

The dialog can be opened from the **Table of Contents** button in the **References** tab of the [RadRichTextBoxRibbonUI](https://www.telerik.com/products/wpf/documentation/controls/radrichtextbox/ui-for-applying-rich-text-formatting/features-radrichtextboxribbonui).

![An image showing the button that opens the table of contents dialog of RadRichTextBox for WPF](https://www.telerik.com/products/wpf/documentation/assets/5873205723e017caeaf4909c0afa3721/richtextbox-dialogs-contents-table-1.png)

## Showing the Dialog Manually

The dialog can be shown by executing the `ShowInsertTableOfContentsDialogCommand`. See how to bind the command to an external button in the [Commands](https://www.telerik.com/products/wpf/documentation/controls/radrichtextbox/features/commands) article.

**Executing the show dialog command**

```C#
	this.richTextBox.Commands.ShowInsertTableOfContentsDialogCommand.Execute(null);
```

Alternatively, call the `ShowInsertTableOfContentsDialog` method of `RadRichTextBox`.

**Using the show dialog method**

```C#
	this.richTextBox.ShowInsertTableOfContentsDialog();
```
