# TextViewGenerator.CharFormatChanged Event

> Occurs when the character formatting attributes either of the selected characters or the current text input position have been changed. Formatting attributes that can be asigned to single characters are the font, the font attributes, text colors and the baseline. The event handler receives an argument of type EventArgs containing data related to this event.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Event
- **Introduced:** 21.0
- **Namespace:** `TXTextControl.ServerVisualisation`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Server.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.Server.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Server.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl.ServerVisualization > TextViewGenerator.CharFormatChanged Event
- **342 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/charformatchanged-event/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/charformatchanged-event/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/charformatchanged-event/llms-full.txt

---

### Description

Occurs when the character formatting attributes either of the selected characters or the current text input position have been changed. Formatting attributes that can be asigned to single characters are the font, the font attributes, text colors and the baseline. The event handler receives an argument of type EventArgs containing data related to this event.

### Syntax

```csharp
public event EventHandler CharFormatChanged;
```

```vbnet
Public Event CharFormatChanged As EventHandler
```

### Examples

The following example records useful context when char format changed occurs.

```csharp
textViewGenerator.CharFormatChanged += (sender, e) =>
{
    Console.WriteLine($"Char Format Changed at {DateTime.Now:u}");
};
```

```vbnet
AddHandler textViewGenerator.CharFormatChanged,
    Sub(sender, e)
        Console.WriteLine($"Char Format Changed at {DateTime.Now:u}")
    End Sub
```

---

## Nearby

- **Previous:** [TextViewGenerator.Changed Event](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/changed-event/llms-full.txt)
- **Next:** [TextViewGenerator.ChartDeselected Event](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/chartdeselected-event/llms-full.txt)
