TX Text Control .NET for WPF

HighlightMode Property

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

Description

Gets or sets a value indicating how the text of the table of contents is highlighted.

Syntax

public HighlightMode HighlightMode { get; set; }

Members

ValueDescription
AutoThis value is not used for tables of contents.
ActivatedThe table of contents is only highlighted, when it contains the current text input position and when the control has the input focus.
AlwaysThe table of contents is always highlighted.
NeverThe table of contents is never highlighted.

Examples

The following example creates a table of contents for the document's heading styles by using TableOfContents.HighlightMode.

TableOfContents tableOfContents = new(1, 3) { Name = "Contents", ID = 10 };
textControl.TablesOfContents.Add(tableOfContents);

tableOfContents.HighlightMode = HighlightMode.Never;
Console.WriteLine($"Highlight Mode used by Table Of Contents: {tableOfContents.HighlightMode}");