# TextControl.CommentChanged Event

> Occurs when the text of a comment has been altered. The event handler receives an argument of type CommentEventArgs containing data related to this event.

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

---

### Description

Occurs when the text of a comment has been altered. The event handler receives an argument of type [CommentEventArgs](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commenteventargs/llms-full.txt) containing data related to this event.

### Syntax

```csharp
public event CommentEventHandler CommentChanged;
```

```vbnet
Public Event CommentChanged As CommentEventHandler
```

### Examples

The following example records useful context when comment changed occurs.

```csharp
textControl.CommentChanged += (sender, e) =>
{
    Console.WriteLine($"Comment Changed at {DateTime.Now:u}");
};
```

```vbnet
AddHandler textControl.CommentChanged,
    Sub(sender, e)
        Console.WriteLine($"Comment Changed at {DateTime.Now:u}")
    End Sub
```

---

## Nearby

- **Previous:** [TextControl.ClearUndo Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/clearundo-method/llms-full.txt)
- **Next:** [TextControl.CommentCreated Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/commentcreated-event/llms-full.txt)
