Skip to main content
A newer version of this page is available. .

BarCodeControl Class

Displays a bar code.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v19.1.dll


[ToolboxBitmap(typeof(ToolboxIconsRootNS), "BarCodeControl")]
public class BarCodeControl :


The BarCodeControl supports multiple bar code types. The following images illustrate some of them.

QR Code EAN 8 PDF417
BarCode-QRCode-ex BarCode-EAN8-ex BarCode-PDF417-ex

The bar code type is specified by the BarCodeControl.Symbology property.

  • At design time within Visual Studio, you can set this property using the Properties window.


    After selecting a bar code type, you can expand the Symbology property to access additional customization options.


  • To specify the symbology in code, create a specific BarCodeGeneratorBase descendant and assign it to the Symbology property of the BarCodeControl.

    A bar code generator object provides access to additional customization properties specific to the selected bar code type.

Some of the main bar code options are described below.


This example illustrates how to use BarCodeControl to display a QR code.


using DevExpress.XtraPrinting.BarCode;
using DevExpress.XtraEditors;

BarCodeControl barCodeControl1 = new BarCodeControl();
barCodeControl1.Parent = this;
barCodeControl1.Size = new System.Drawing.Size(150, 150);
barCodeControl1.AutoModule = true;
barCodeControl1.Text = "1234567890";
QRCodeGenerator symb = new QRCodeGenerator();
barCodeControl1.Symbology = symb;

// Adjust the QR barcode's specific properties.
symb.CompactionMode = QRCodeCompactionMode.AlphaNumeric;
symb.ErrorCorrectionLevel = QRCodeErrorCorrectionLevel.H;
symb.Version = QRCodeVersion.AutoVersion;
See Also