# TextControl.TextFrameDeactivated Event

> Occurs when a text frame loses the current text input position and another part of the document such as a header, a footer or the main text gets it. The event handler receives an argument of type TextFrameEventArgs 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.TextFrameDeactivated Event
- **343 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/textframedeactivated-event/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/textframedeactivated-event/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/textframedeactivated-event/llms-full.txt

---

### Description

Occurs when a text frame loses the current text input position and another part of the document such as a header, a footer or the main text gets it. The event handler receives an argument of type [TextFrameEventArgs](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textframeeventargs/llms-full.txt) containing data related to this event.

### Syntax

```csharp
public event TextFrameEventHandler TextFrameDeactivated;
```

```vbnet
Public Event TextFrameDeactivated As TextFrameEventHandler
```

### Examples

The following example records useful context when text frame deactivated occurs.

```csharp
textControl.TextFrameDeactivated += (sender, e) =>
{
    Console.WriteLine($"Text Frame Deactivated at {DateTime.Now:u}");
};
```

```vbnet
AddHandler textControl.TextFrameDeactivated,
    Sub(sender, e)
        Console.WriteLine($"Text Frame Deactivated at {DateTime.Now:u}")
    End Sub
```

---

## Nearby

- **Previous:** [TextControl.TextFrameCreated Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/textframecreated-event/llms-full.txt)
- **Next:** [TextControl.TextFrameDeleted Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/textframedeleted-event/llms-full.txt)
