# TextField.HighlightMode Property

> Gets or sets a value indicating when the text field is highlighted.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 27.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > TextField.HighlightMode Property
- **607 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textfield/highlightmode-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textfield/highlightmode-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textfield/highlightmode-property/llms-full.txt

---

### Description

Gets or sets a value indicating when the text field is highlighted.

### Syntax

```csharp
public HighlightMode HighlightMode { get; set; }
```

```vbnet
Public Property HighlightMode As HighlightMode
```

### Members

| Value | Description |
|---|---|
| Auto | This value is not used for text fields. |
| Activated | The text field is only highlighted, when it contains the current text input position and when the control has the input focus. |
| Always | The text field is always highlighted. |
| Never | The text field is never highlighted. |

### Examples

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

```csharp
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}");
```

```vbnet
Dim textField As TextField = New ApplicationField(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer name", New String() { "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.

---

## Nearby

- **Previous:** [TextField.HighlightColor Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textfield/highlightcolor-property/llms-full.txt)
- **Next:** [TextField.ID Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textfield/id-property/llms-full.txt)
