# TextControl.HeaderFooterDeactivated Event

> Occurs when a header or footer loses the current text input position and another part of the document such as a textframe or the main text gets it. The event handler receives an argument of type HeaderFooterEventArgs containing data related to this event.

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

---

### Description

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

### Syntax

```csharp
public event HeaderFooterEventHandler HeaderFooterDeactivated;
```

```vbnet
Public Event HeaderFooterDeactivated As HeaderFooterEventHandler
```

### Examples

The following example records useful context when header footer deactivated occurs.

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

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

---

## Nearby

- **Previous:** [TextControl.HeaderFooterActivationStyle Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/headerfooteractivationstyle-property/llms-full.txt)
- **Next:** [TextControl.HeaderFooterFrameStyle Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/headerfooterframestyle-property/llms-full.txt)
