TXBarcodeControl Class
- Namespace
TXTextControl.Barcode
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. WinForms. SDK
- Assembly
TXBarcode.Windows. Forms. dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. WinForms. SDK TXBarcode.from the setup.Windows. Forms. dll
- Inherits
- Control
- TXBarcode
Control
- Implements
- INotify
Property Changed
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 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
public class TXBarcodeControl : Control, INotifyPropertyChangedPublic Class TXBarcodeControl
Inherits Control
Implements INotifyPropertyChangedExamples
The following example creates a TXBarcode Control instance and configures its additional text setting for a document workflow.
using TXTextControl.Barcode.TXBarcodeControl tXBarcodeControl = new();
tXBarcodeControl.AdditionalText = "Quarterly results";Dim tXBarcodeControl As New TXTextControl.Barcode.TXBarcodeControl()
tXBarcodeControl.AdditionalText = "Quarterly results"Members
Constructors
| Constructor | Description |
|---|---|
| TXBarcodeControl | Initializes a new instance of the TXBarcodeControl class. |
Properties
| Property | Description |
|---|---|
| AdditionalText | Gets or sets an additional text that is displayed below or above the barcode image. |
| Alignment | Gets or sets the alignment of the barcode image inside the control. The default value is TXTextControl.Barcode.Alignment.MiddleCenter. |
| Angle | Gets or sets the angle of the barcode image inside the control. The default value is 0. |
| BackColor | Gets or sets the background color for the barcode control. The default color is System.Drawing.SystemColors.Window. |
| BarcodeType | Gets or sets the type of barcode that is rendered. |
| BarcodeTypeSettings | Gets an object of type BarcodeTypeSettings to determine type specific settings for the current used barcode. |
| ForeColor | Gets or sets the foreground color for the barcode. The default color is System.Drawing.SystemColors.WindowText. |
| ShowText | 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. |
| Text | Gets or sets the text the barcode should encrypt. |
| TextAlignment | 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. |
| UpperTextLength | Gets or sets the maximum number of characters the Text property can get. |
Methods
| Method | Description |
|---|---|
| GetDefaultText | Returns the default text for the specified barcode type. |
| GetMaximumTextLength | Returns the maximum text length of the specified barcode type. |
| GetMinimumTextLength | Returns the minimum text length of the specified barcode type. |
| GetSVG | Not described in the reference. public string GetSVG(Size size); |
| IsTextValid | 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. |
| Load | Loads barcode data into the control. |
| PrintPaint | Draws the barcode on the specified System.Drawing.Graphics object. |
| Save | Saves the barcode data. |
| SaveImage | Saves the barcode image. |
Events
| Event | Description |
|---|---|
| PropertyChanged | Not described in the reference. public event PropertyChangedEventHandler PropertyChanged; |