TX Text Control .NET for WPF

TableOfContentsDialog Method

Method|Introduced in 29.0
Namespace
TXTextControl.WPF
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.WPF.dll from the private NuGet feed or Text Control Offline Packages

Description

Invokes the built-in dialog box for inserting or changing a table of contents. If the current text input position is in an existing table of contents, the dialog box shows its attributes and the user can change it. Otherwise, a new table of contents is inserted with the specified attributes.

Syntax

public DialogResult TableOfContentsDialog();

Return Value

If the dialog has been left with the Cancel button the return value is DialogResult.Cancel. Otherwise, it is DialogResult.OK.

Examples

The following example opens the table of contents dialog for the text control.

var result = textControl.TableOfContentsDialog();
Console.WriteLine($"Table Of Contents Dialog result: {result}");