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

BarCodeControl.Symbology Property

Gets or sets the symbology (code type) for the bar code and the text.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v18.2.dll

Declaration

[DXCategory("Behavior")]
[DefaultValue(BarCodeSymbology.Code128)]
[SmartTagProperty("Symbology", "", SmartTagActionType.RefreshBoundsAfterExecute)]
public BarCodeGeneratorBase Symbology { get; set; }

Property Value

Type Default Description
BarCodeGeneratorBase **Code128**

A BarCodeGeneratorBase class descendant that defines the symbology for the current BarCodeControl control.

Remarks

The symbology determines the bar code type including the set of allowed characters. Available bar code types are listed below.

1D Bar Codes

2D Bar Codes

Example

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

BarCode-QRCode-ex2

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;

The following code snippets (auto-collected from DevExpress Examples) contain references to the Symbology property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also