TX Text Control .NET for WPF

HighlightMode Property

Property|Introduced in 30.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 whether the commented text is highlighted.

Syntax

public HighlightMode HighlightMode { get; set; }

Members

ValueDescription
AutoDefault. The commented text is highlighted as specified through the TextControl.CommentHighlightMode or WPF.TextControl.CommentHighlightMode property.
ActivatedThe commented text is highlighted when it contains the text input position.
AlwaysThe commented text is always highlighted.
NeverThe commented text is never highlighted.

Examples

The following example attaches a reviewer comment to selected contract text by using CommentedText.HighlightMode.

textControl.Text = "Payment is due within 30 days.";
textControl.Select(0, textControl.Text.Length);
CommentedText commentedText = new("Verify the payment term.");
textControl.Comments.Add(commentedText);

commentedText.HighlightMode = HighlightMode.Never;
Console.WriteLine($"Highlight Mode used by Commented Text: {commentedText.HighlightMode}");