Back to Devexpress

QRCodeGS1Options Class

officefileapi-devexpress-dot-barcodes-dot-qrcodegs1options.md

latest3.3 KB
Original Source

QRCodeGS1Options Class

Contains options specific to this symbology (bar code type).

Namespace : DevExpress.BarCodes

Assembly : DevExpress.Docs.v25.2.dll

NuGet Package : DevExpress.Document.Processor

Declaration

csharp
public class QRCodeGS1Options :
    QRCodeOptions
vb
Public Class QRCodeGS1Options
    Inherits QRCodeOptions

The following members return QRCodeGS1Options objects:

Remarks

Access the QRCodeGS1Options object with the QRCodeGS1 property.

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

csharp
using DevExpress.BarCodes;
using DevExpress.Drawing.Extensions;
using System;
using System.Drawing;
using System.Windows.Forms;

//...

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

    BarCode barCode = new BarCode();
    barCode.Symbology = Symbology.QRCodeGS1;
    barCode.CodeText = "0123456789";
    barCode.BackColor = Color.White;
    barCode.ForeColor = Color.Black;
    barCode.RotationAngle = 0;
    barCode.Options.QRCodeGS1.CompactionMode = DevExpress.BarCodes.QRCodeCompactionMode.AlphaNumeric;
    barCode.Options.QRCodeGS1.ErrorLevel = QRCodeErrorLevel.H;
    barCode.Options.QRCodeGS1.ShowCodeText = false;
    barCode.Options.QRCodeGS1.FNC1Substitute = "#";
    barCode.DpiX = 72;
    barCode.DpiY = 72;
    barCode.Module = 2f;

    this.pictureBox1.Image = barCode.BarCodeImage.ConvertToGdiPlusImage();
}
vb
Imports DevExpress.BarCodes
Imports DevExpress.Drawing.Extensions
Imports System
Imports System.Drawing
Imports System.Windows.Forms

'...

Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs)
    Me.pictureBox1.Image = Nothing

    Dim barCode As New BarCode()
    barCode.Symbology = Symbology.QRCodeGS1
    barCode.CodeText = "0123456789"
    barCode.BackColor = Color.White
    barCode.ForeColor = Color.Black
    barCode.RotationAngle = 0
    barCode.Options.QRCodeGS1.CompactionMode = DevExpress.BarCodes.QRCodeCompactionMode.AlphaNumeric
    barCode.Options.QRCodeGS1.ErrorLevel = QRCodeErrorLevel.H
    barCode.Options.QRCodeGS1.ShowCodeText = False
    barCode.Options.QRCodeGS1.FNC1Substitute = "#"
    barCode.DpiX = 72
    barCode.DpiY = 72
    barCode.Module = 2F

    Me.pictureBox1.Image = barCode.BarCodeImage.ConvertToGdiPlusImage()
End Sub

Inheritance

Object BarCodeGeneratorOptions QRCodeOptions QRCodeGS1Options

See Also

QRCodeGS1Options Members

Bar Code Options

DevExpress.BarCodes Namespace