HighlightColor Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets or sets the highlight color for the text field. The color's alpha value must be less than 255 (opaque) so that the text field's text remains visible. The default value is black with an alpha value of 60 (light gray).
Syntax
public Color HighlightColor { get; set; }Public Property HighlightColor As ColorExamples
The following example inserts a Word-compatible text field into a template by using TextField.HighlightColor.
TextField textField = new ApplicationField(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer name", new[] { "CustomerName" });
textControl.TextFields.Add(textField);
textField.HighlightColor = System.Drawing.Color.LightSteelBlue;
Console.WriteLine($"Highlight Color used by Text Field: {textField.HighlightColor}");Dim textField As TextField = New ApplicationField(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer name", New String() { "CustomerName" })
textControl.TextFields.Add(textField)
textField.HighlightColor = System.Drawing.Color.LightSteelBlue
Console.WriteLine($"Highlight Color used by Text Field: {textField.HighlightColor}")