# ServerTextControl.BarcodeCreated Event

> Occurs when a new barcode has been created. It occurs, when a file containing barcodes has been loaded. It does not occur, when a barcode has been added with the BarcodeCollection.Add method. The event handler receives an argument of type BarcodeEventArgs containing data related to this event.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Event
- **Introduced:** 19.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.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 for WPF > Reference > TXTextControl > ServerTextControl.BarcodeCreated Event
- **366 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/barcodecreated-event/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/barcodecreated-event/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/barcodecreated-event/llms-full.txt

---

### Description

Occurs when a new barcode has been created. It occurs, when a file containing barcodes has been loaded. It does not occur, when a barcode has been added with the [BarcodeCollection.Add](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-datavisualization/barcodecollection/add-method/llms-full.txt) method. The event handler receives an argument of type [BarcodeEventArgs](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-datavisualization/barcodeeventargs/llms-full.txt) containing data related to this event.

### Syntax

```csharp
public event BarcodeEventHandler BarcodeCreated;
```

```vbnet
Public Event BarcodeCreated As BarcodeEventHandler
```

### Examples

The following example records useful context when barcode created occurs.

```csharp
textControl.BarcodeCreated += (sender, e) =>
{
    Console.WriteLine($"Barcode Created at {DateTime.Now:u}");
};
```

```vbnet
AddHandler textControl.BarcodeCreated,
    Sub(sender, e)
        Console.WriteLine($"Barcode Created at {DateTime.Now:u}")
    End Sub
```

---

## Nearby

- **Previous:** [ServerTextControl.BackColor Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/backcolor-property/llms-full.txt)
- **Next:** [ServerTextControl.BarcodeDeleted Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/barcodedeleted-event/llms-full.txt)
