# BarcodeFrame Class

> An instance of the BarcodeFrame class represents a barcode and its layout in a Text Control document. A barcode can be positioned in the document like an image or a textframe, either geometrically or as a single character. Geometrically its position can either be relative to a paragraph to which it is anchored or relative to the complete document. The BarcodeFrame class handles the positioning of the barcode in the document. A barcode frame is always associated with a barcode control of the type TXTextControl.Barcode.TXBarcodeControl or TXTextControl.WPF.Barcode.TXBarcodeControl. This barcode control handles the appearance and the data of the barcode. All barcodes in a document are contained in a BarcodeCollection. The collection can also be used to add barcodes to or to remove barcodes from the document. The barcode collection can be obtained through the TextControl.Barcodes, WPF.TextControl.Barcodes or ServerTextControl.Barcodes property.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 19.0
- **Namespace:** `TXTextControl.DataVisualization`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Inherits:** `TXTextControl.FrameBase`
- **Path:** TX Text Control .NET Server > Reference > TXTextControl.DataVisualization > BarcodeFrame Class
- **2645 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodeframe/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodeframe/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodeframe/llms-full.txt

---

### Description

An instance of the BarcodeFrame class represents a barcode and its layout in a Text Control document. A barcode can be positioned in the document like an image or a textframe, either geometrically or as a single character. Geometrically its position can either be relative to a paragraph to which it is anchored or relative to the complete document. The BarcodeFrame class handles the positioning of the barcode in the document. A barcode frame is always associated with a barcode control of the type [TXTextControl.Barcode.TXBarcodeControl](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecontrol/llms-full.txt) or [TXTextControl.WPF.Barcode.TXBarcodeControl](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-barcode/txbarcodecontrol/llms-full.txt). This barcode control handles the appearance and the data of the barcode. All barcodes in a document are contained in a [BarcodeCollection](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodecollection/llms-full.txt). The collection can also be used to add barcodes to or to remove barcodes from the document. The barcode collection can be obtained through the [TextControl.Barcodes](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/barcodes-property/llms-full.txt), [WPF.TextControl.Barcodes](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/barcodes-property/llms-full.txt) or [ServerTextControl.Barcodes](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/servertextcontrol/barcodes-property/llms-full.txt) property.

### Syntax

```csharp
public class BarcodeFrame : FrameBase
```

```vbnet
Public Class BarcodeFrame
    Inherits FrameBase
```

### Examples

The following example creates a Barcode Frame instance and configures its export compression quality setting for a document workflow.

```csharp
TXTextControl.DataVisualization.BarcodeFrame barcodeFrame = new("Approved");
barcodeFrame.ExportCompressionQuality = 90;
```

```vbnet
Dim barcodeFrame As New TXTextControl.DataVisualization.BarcodeFrame("Approved")
barcodeFrame.ExportCompressionQuality = 90
```

---

## In This Section

- [BarcodeFrame.AddUndoUnit Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodeframe/addundounit-method/llms-full.txt): Adds the current state of the barcode which is connected with this BarcodeFrame to the undo stack. Programmatic changes performed with the barcode's properties and methods are not automatically added to a TextControl's undo stack. Calling this method is not necessary, when the barcode frame's layout in the text is changed.
- [BarcodeFrame.Barcode Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodeframe/barcode-property/llms-full.txt): Gets the barcode control associated with the barcode frame. It must be of the type TXTextControl.Barcode.TXBarcodeControl or TXTextControl.WPF.Barcode.TXBarcodeControl.
- [BarcodeFrame Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodeframe/constructor/llms-full.txt): Initializes a new instance of the BarcodeFrame class.
- [BarcodeFrame.ExportCompressionQuality Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodeframe/exportcompressionquality-property/llms-full.txt): Sets a value between 1 and 100, which is the quality of a lossy data compression used, if the barcode's image is exported. It is only used, if the image data is compressed with a lossy compression algorithm. A value of 100 indicates the maximum quality, a value of 1 indicates the minimum quality. If this property is set to zero, which is the default value, Text Control uses the quality value set with the SaveSettings.ImageCompressionQuality property.
- [BarcodeFrame.ExportFileName Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodeframe/exportfilename-property/llms-full.txt): Gets or sets the file name, when the barcode's image is exported. An empty string indicates that no export filename has currently be specified for the barcode's image. In this case a constructed filename is used. A filename is constructed in the following form: <document_filename>_<number>.<extension>. The technical article Loading and Saving Images describes where newly created image files are stored.
- [BarcodeFrame.ExportFilterIndex Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodeframe/exportfilterindex-property/llms-full.txt): Gets or sets the format used, if a barcode's image is exported. This is the number of the filter in the string returned through the ImageCollection.ExportFilters property, beginning with number one. A value of zero indicates that no export format has currently be specified for the barcode. In this case the barcode's image is saved in Windows Bitmap format. The technical article Loading and Saving Images lists the currently possible values for this property.
- [BarcodeFrame.ExportResolution Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodeframe/exportresolution-property/llms-full.txt): Gets or sets the maximum resolution in dots per inch in which the barcode's image is saved. If this property's value is zero, which is the default value, Text Control uses the resolution value set with the SaveSettings.ImageMaxResolution property.
- [BarcodeFrame.Refresh Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodeframe/refresh-method/llms-full.txt): Refreshes the barcode. Programmatic changes performed with the barcode's properties and methods are not automatically refreshed. Calling this method is not necessary, when the barcode frame's layout in the text is changed.
- [BarcodeFrame.SaveMode Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodeframe/savemode-property/llms-full.txt): Determines whether the barcode's image is stored through its binary data or through a file reference. By default a barcode's image is stored with its binary data.

---

## Nearby

- **Previous:** [BarcodeEventArgs.BarcodeFrame Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodeeventargs/barcodeframe-property/llms-full.txt)
- **Next:** [BarcodeFrame.AddUndoUnit Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodeframe/addundounit-method/llms-full.txt)
