TX Text Control .NET for WPF

HighlightMode Property

Property|Introduced in 27.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 when the text field is highlighted.

Syntax

public HighlightMode HighlightMode { get; set; }

Members

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

Examples

The following example inserts a Word-compatible text field into a template by using TextField.HighlightMode.

TextField textField = new ApplicationField(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer name", new[] { "CustomerName" });
textControl.TextFields.Add(textField);

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

Remarks

The property's default value is HighlightMode.Never.