HighlightMode Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets or sets a value indicating whether the commented text is highlighted.
Syntax
public HighlightMode HighlightMode { get; set; }Public Property HighlightMode As HighlightModeMembers
| Value | Description |
|---|---|
| Auto | Default. The commented text is highlighted as specified through the TextControl.CommentHighlightMode or WPF.TextControl.CommentHighlightMode property. |
| Activated | The commented text is highlighted when it contains the text input position. |
| Always | The commented text is always highlighted. |
| Never | The 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}");textControl.Text = "Payment is due within 30 days."
textControl.Select(0, textControl.Text.Length)
Dim commentedText As New CommentedText("Verify the payment term.")
textControl.Comments.Add(commentedText)
commentedText.HighlightMode = HighlightMode.Never
Console.WriteLine($"Highlight Mode used by Commented Text: {commentedText.HighlightMode}")