# TXBarcodeControl Class

> The TXBarcodeControl class provides properties to define type and format of the barcode it displays in WPF. It can be added to a document with the WPF.TextControl.Barcodes property. The WPF.TXBarcodeControl class is inherited from the System.Windows.FrameworkElement class. The following describes only the properties, methods and events defined through the WPF.TXBarcodeControl class. For a list of properties, methods and events inherited from the System.Windows.FrameworkElement class see the .NET Framework reference.

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

---

### Description

The TXBarcodeControl class provides properties to define type and format of the barcode it displays in `WPF`. It can be added to a document with the [WPF.TextControl.Barcodes](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/barcodes-property/llms-full.txt) property. The WPF.TXBarcodeControl class is inherited from the `System.Windows.FrameworkElement` class. The following describes only the properties, methods and events defined through the WPF.TXBarcodeControl class. For a list of properties, methods and events inherited from the `System.Windows.FrameworkElement` class see the .NET Framework reference.

### Syntax

```csharp
public class TXBarcodeControl : FrameworkElement
```

```vbnet
Public Class TXBarcodeControl
    Inherits FrameworkElement
```

### Examples

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

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

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

---

## In This Section

- [TXBarcodeControl.AdditionalText Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-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-wpf/reference/txtextcontrol-wpf-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-wpf/reference/txtextcontrol-wpf-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-wpf/reference/txtextcontrol-wpf-barcode/txbarcodecontrol/backcolor-property/llms-full.txt): Gets or sets the background color for the barcode control. The default value is null and represents the color SystemColors.WindowColor.
- [TXBarcodeControl.BarcodeType Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-barcode/txbarcodecontrol/barcodetype-property/llms-full.txt): Gets or sets the type of barcode that should be displayed. This is a dependency property.
- [TXBarcodeControl.BarcodeTypeSettings Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-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-wpf/reference/txtextcontrol-wpf-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-wpf/reference/txtextcontrol-wpf-barcode/txbarcodecontrol/forecolor-property/llms-full.txt): Gets or sets the foreground color for the barcode. The default value is null and represents the color SystemColors.WindowTextColor.
- [TXBarcodeControl.GetDefaultText Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-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-wpf/reference/txtextcontrol-wpf-barcode/txbarcodecontrol/getmaximumtextlength-method/llms-full.txt): Returns the maximum text length the specified barcode type can have.
- [TXBarcodeControl.GetMinimumTextLength Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-barcode/txbarcodecontrol/getminimumtextlength-method/llms-full.txt): Returns the minimum text length the specified barcode type can have.
- [TXBarcodeControl.IsTextValid Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-barcode/txbarcodecontrol/istextvalid-method/llms-full.txt): Returns a value whether the specified text is valid for a specific barcode type. In case of invalid text an appropriate exception message is saved into the specified string.
- [TXBarcodeControl.Load Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-barcode/txbarcodecontrol/load-method/llms-full.txt): Loads barcode data into the control.
- [TXBarcodeControl.PrintPaint Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-barcode/txbarcodecontrol/printpaint-method/llms-full.txt): Draws the barcode on a specific object of type System.Drawing.Graphics or System.Windows.Media.DrawingContext with specified bounds or stretch factor.
- [TXBarcodeControl.Save Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-barcode/txbarcodecontrol/save-method/llms-full.txt): Saves the barcode data.
- [TXBarcodeControl.SaveImage Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-barcode/txbarcodecontrol/saveimage-method/llms-full.txt): Saves the barcode image.
- [TXBarcodeControl.ShowText Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-barcode/txbarcodecontrol/showtext-property/llms-full.txt): Gets or sets a value indicating whether the barcode text 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-wpf/reference/txtextcontrol-wpf-barcode/txbarcodecontrol/text-property/llms-full.txt): Gets or sets the text the barcode should encrypt. This is a dependency property.
- [TXBarcodeControl.TextAlignment Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-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-wpf/reference/txtextcontrol-wpf-barcode/txbarcodecontrol/uppertextlength-property/llms-full.txt): Gets or sets the maximum number of characters the Text property can have. This is a dependency property.

---

## Nearby

- **Previous:** [TXTextControl.WPF.Barcode namespace](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-barcode/llms-full.txt)
- **Next:** [TXBarcodeControl.AdditionalText Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-barcode/txbarcodecontrol/additionaltext-property/llms-full.txt)
