# TextViewGenerator.OnBarcodeDeselected Method

> Raises the BarcodeDeselected event.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **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.OnBarcodeDeselected Method
- **553 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/onbarcodedeselected-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/onbarcodedeselected-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/onbarcodedeselected-method/llms-full.txt

---

### Description

Raises the BarcodeDeselected event.

### Syntax

```csharp
protected virtual void OnBarcodeDeselected(BarcodeEventArgs e);
```

```vbnet
Protected Overridable Sub OnBarcodeDeselected(e As BarcodeEventArgs)
```

### Parameters

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

### Examples

The following example extends Text View Generator and performs custom processing when On Barcode Deselected is invoked.

```csharp
class CustomTextViewGenerator : TXTextControl.ServerVisualisation.TextViewGenerator
{
    protected override void OnBarcodeDeselected(TXTextControl.DataVisualization.BarcodeEventArgs e)
    {
        // Add custom processing before registered event handlers run.
        base.OnBarcodeDeselected(e);
    }
}
```

```vbnet
Class CustomTextViewGenerator
    Inherits TXTextControl.ServerVisualisation.TextViewGenerator

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

---

## Nearby

- **Previous:** [TextViewGenerator.MainTextActivated Event](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/maintextactivated-event/llms-full.txt)
- **Next:** [TextViewGenerator.OnBarcodeSelected Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/onbarcodeselected-method/llms-full.txt)
