# CommentedText.HighlightMode Property

> Gets or sets a value indicating whether the commented text is highlighted.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 30.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.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 Server > Reference > TXTextControl > CommentedText.HighlightMode Property
- **735 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/commentedtext/highlightmode-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/commentedtext/highlightmode-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/commentedtext/highlightmode-property/llms-full.txt

---

### Description

Gets or sets a value indicating whether the commented text is highlighted.

### Syntax

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

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

### Members

| Value | Description |
|---|---|
| Auto | Default. The commented text is highlighted as specified through the [TextControl.CommentHighlightMode](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/commenthighlightmode-property/llms-full.txt) or [WPF.TextControl.CommentHighlightMode](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/commenthighlightmode-property/llms-full.txt) 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`.

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

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

---

## Nearby

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