.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

QRCodeOptions Class

Contains options specific to the QR symbology.

Namespace: DevExpress.BarCodes

Assembly: DevExpress.Docs.v21.1.dll

Declaration

public class QRCodeOptions :
    BarCodeGeneratorOptions

Remarks

Access the QRCodeOptions object using the BarCodeOptions.QRCode property.

The code sample below creates a QR code and displays it in a PictureBox.

using System;
using System.Drawing;
using System.Text;
using DevExpress.BarCodes;
//...

private void button1_Click(object sender, EventArgs e)
{
    this.pictureBox1.Image = null;

    BarCode barCode = new BarCode();
    barCode.Symbology = Symbology.QRCode;
    barCode.CodeText = "https://www.devexpress.com/";
    barCode.BackColor = Color.White;
    barCode.ForeColor = Color.Black;
    barCode.RotationAngle = 0;
    barCode.CodeBinaryData = Encoding.Default.GetBytes(barCode.CodeText);
    barCode.Options.QRCode.CompactionMode = QRCodeCompactionMode.Byte;
    barCode.Options.QRCode.ErrorLevel = QRCodeErrorLevel.Q;
    barCode.Options.QRCode.ShowCodeText = false;
    barCode.DpiX = 72;
    barCode.DpiY = 72;
    barCode.Module = 2f;

    this.pictureBox1.Image = barCode.BarCodeImage;
}

Inheritance

See Also