# TextControl.OnDrawingDeactivated Method

> Raises the DrawingDeactivated event.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 23.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.OnDrawingDeactivated Method
- **543 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/ondrawingdeactivated-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/ondrawingdeactivated-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/ondrawingdeactivated-method/llms-full.txt

---

### Description

Raises the DrawingDeactivated event.

### Syntax

```csharp
protected virtual void OnDrawingDeactivated(DrawingEventArgs e);
```

```vbnet
Protected Overridable Sub OnDrawingDeactivated(e As DrawingEventArgs)
```

### Parameters

| Parameter | Description |
|---|---|
| e | Specifies an [DrawingEventArgs](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-datavisualization/drawingeventargs/llms-full.txt) object that contains the event data. |

### Examples

The following example extends Text Control and performs custom processing when On Drawing Deactivated is invoked.

```csharp
class CustomTextControl : TXTextControl.WPF.TextControl
{
    protected override void OnDrawingDeactivated(TXTextControl.DataVisualization.DrawingEventArgs e)
    {
        // Add custom processing before registered event handlers run.
        base.OnDrawingDeactivated(e);
    }
}
```

```vbnet
Class CustomTextControl
    Inherits TXTextControl.WPF.TextControl

    Protected Overrides Sub OnDrawingDeactivated(e As TXTextControl.DataVisualization.DrawingEventArgs)
        ' Add custom processing before registered event handlers run.
        MyBase.OnDrawingDeactivated(e)
    End Sub
End Class
```

---

## Nearby

- **Previous:** [TextControl.OnDrawingCreated Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/ondrawingcreated-method/llms-full.txt)
- **Next:** [TextControl.OnDrawingDeleted Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/ondrawingdeleted-method/llms-full.txt)
