# TextControl.CommentCreated Event

> Occurs when a piece of text has been commented. 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.CommentCreated Event
- **315 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/commentcreated-event/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/commentcreated-event/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/commentcreated-event/llms-full.txt

---

### Description

Occurs when a piece of text has been commented. 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 CommentCreated;
```

```vbnet
Public Event CommentCreated As CommentEventHandler
```

### Examples

The following example records useful context when comment created occurs.

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

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

---

## Nearby

- **Previous:** [TextControl.CommentChanged Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/commentchanged-event/llms-full.txt)
- **Next:** [TextControl.CommentDeleted Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/commentdeleted-event/llms-full.txt)
