# TXBarcodeControl Class

> The TXBarcodeControl class provides properties to specify type and format of barcodes rendered in Windows Forms. It can be added to a document with the TextControl.Barcodes property. The class implements the System.ComponentModel.INotifyPropertyChanged interface. The following describes only the properties defined through the TXBarcodeControl class. For a list of properties, methods and events inherited from the System.ComponentModel.INotifyPropertyChanged interface see the .NET Framework reference.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 29.0
- **Namespace:** `TXTextControl.Barcode`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXBarcode.Windows.Forms.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXBarcode.Windows.Forms.dll` from the setup
- **Inherits:** `System.Windows.Forms.Control`
- **Implements:** `System.ComponentModel.INotifyPropertyChanged`
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl.Barcode > TXBarcodeControl Class
- **1661 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/llms-full.txt

---

### Description

The TXBarcodeControl class provides properties to specify type and format of barcodes rendered in `Windows Forms`. It can be added to a document with the [TextControl.Barcodes](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/barcodes-property/llms-full.txt) property. The class implements the `System.ComponentModel.INotifyPropertyChanged` interface. The following describes only the properties defined through the `TXBarcodeControl` class. For a list of properties, methods and events inherited from the `System.ComponentModel.INotifyPropertyChanged` interface see the .NET Framework reference.

### Syntax

```csharp
public class TXBarcodeControl : Control, INotifyPropertyChanged
```

```vbnet
Public Class TXBarcodeControl
    Inherits Control
    Implements INotifyPropertyChanged
```

### Examples

The following example creates a TXBarcode Control instance and configures its additional text setting for a document workflow.

```csharp
using TXTextControl.Barcode.TXBarcodeControl tXBarcodeControl = new();
tXBarcodeControl.AdditionalText = "Quarterly results";
```

```vbnet
Dim tXBarcodeControl As New TXTextControl.Barcode.TXBarcodeControl()
tXBarcodeControl.AdditionalText = "Quarterly results"
```

---

## In This Section

- [TXBarcodeControl.AdditionalText Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/additionaltext-property/llms-full.txt): Gets or sets an additional text that is displayed below or above the barcode image.
- [TXBarcodeControl.Alignment Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/alignment-property/llms-full.txt): Gets or sets the alignment of the barcode image inside the control. The default value is TXTextControl.Barcode.Alignment.MiddleCenter.
- [TXBarcodeControl.Angle Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/angle-property/llms-full.txt): Gets or sets the angle of the barcode image inside the control. The default value is 0.
- [TXBarcodeControl.BackColor Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/backcolor-property/llms-full.txt): Gets or sets the background color for the barcode control. The default color is System.Drawing.SystemColors.Window.
- [TXBarcodeControl.BarcodeType Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/barcodetype-property/llms-full.txt): Gets or sets the type of barcode that is rendered.
- [TXBarcodeControl.BarcodeTypeSettings Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/barcodetypesettings-property/llms-full.txt): Gets an object of type BarcodeTypeSettings to determine type specific settings for the current used barcode.
- [TXBarcodeControl Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/constructor/llms-full.txt): Initializes a new instance of the TXBarcodeControl class.
- [TXBarcodeControl.ForeColor Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/forecolor-property/llms-full.txt): Gets or sets the foreground color for the barcode. The default color is System.Drawing.SystemColors.WindowText.
- [TXBarcodeControl.GetDefaultText Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/getdefaulttext-method/llms-full.txt): Returns the default text for the specified barcode type.
- [TXBarcodeControl.GetMaximumTextLength Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/getmaximumtextlength-method/llms-full.txt): Returns the maximum text length of the specified barcode type.
- [TXBarcodeControl.GetMinimumTextLength Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/getminimumtextlength-method/llms-full.txt): Returns the minimum text length of the specified barcode type.
- [TXBarcodeControl.IsTextValid Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/istextvalid-method/llms-full.txt): Returns a value indicating whether the specified text is valid for a specific barcode type. In case of an invalid text, an exception message is saved into the specified string.
- [TXBarcodeControl.Load Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/load-method/llms-full.txt): Loads barcode data into the control.
- [TXBarcodeControl.PrintPaint Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/printpaint-method/llms-full.txt): Draws the barcode on the specified System.Drawing.Graphics object.
- [TXBarcodeControl.Save Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/save-method/llms-full.txt): Saves the barcode data.
- [TXBarcodeControl.SaveImage Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/saveimage-method/llms-full.txt): Saves the barcode image.
- [TXBarcodeControl.ShowText Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/showtext-property/llms-full.txt): Gets or sets a value indicating whether the encrypted barcode text value is displayed below or above the barcode image or not. The default value is true.
- [TXBarcodeControl.Text Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/text-property/llms-full.txt): Gets or sets the text the barcode should encrypt.
- [TXBarcodeControl.TextAlignment Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/textalignment-property/llms-full.txt): Gets or sets a value indicating whether the barcode text and additional text is displayed below or above the barcode image. The default value is Bottom.
- [TXBarcodeControl.UpperTextLength Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/uppertextlength-property/llms-full.txt): Gets or sets the maximum number of characters the Text property can get.

---

## Nearby

- **Previous:** [TextAlignment Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/textalignment/enumeration/llms-full.txt)
- **Next:** [TXBarcodeControl.AdditionalText Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/additionaltext-property/llms-full.txt)
