# TextControl.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 for WPF
- **Section:** Reference
- **Kind:** Event
- **Introduced:** 16.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.CharFormatChanged Event
- **340 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/charformatchanged-event/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/charformatchanged-event/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/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
textControl.CharFormatChanged += (sender, e) =>
{
    Console.WriteLine($"Char Format Changed at {DateTime.Now:u}");
};
```

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

---

## Nearby

- **Previous:** [TextControl.Changed Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/changed-event/llms-full.txt)
- **Next:** [TextControl.Clear Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/clear-method/llms-full.txt)
