Version

Configuring QR Code

The QR (Quick Response) barcode symbology is a matrix (or two-dimensional) code, readable by QR scanners, mobile phones with a camera, and smartphones. This barcode symbology is one of the most popular types of two-dimensional barcodes, as its content can be decoded at high speed.

The code consists of an array of black square modules arranged in an overall square pattern, including a unique finder pattern located at three corners of the symbol. Module dimensions are user-specified to enable symbol production by a wide variety of techniques.

The following properties are specific to the XamQRCodeBarcode symbology.

Error Correction Level

QR Code has an error correction feature to restore the encoded data if the barcode is damaged or dirty. The user can choose from four error correction levels in accordance with the use case which are set through XamQRCodeBarcode control’s ErrorCorrectionLevel property.

In XAML:

<ig:XamQRCodeBarcode
    x:Name="Barcode"
    Data="QR Code"
    ErrorCorrectionLevel="Medium" />

In Visual Basic:

Dim Barcode As New XamQRCodeBarcode()
Barcode.Data = "QR Code"
Barcode.ErrorCorrectionLevel = QRCodeErrorCorrectionLevel.Medium

In C#:

XamQRCodeBarcode Barcode = new XamQRCodeBarcode();
Barcode.Data = "QR Code";
Barcode.ErrorCorrectionLevel = QRCodeErrorCorrectionLevel.Medium;
xamBarcode Adding QR Code 06.png

Size Version

Each size version has a different number of modules (the module refers to the black and white modules that make up the QR code matrix):

  • Undefined – this size version is specific to the XamQRCodeBarcode and internally calculates the smallest version that accommodates the data;

  • Version1 - 21x21 modules;

  • Version40 – 177x177 modules.

The size version of the XamQRCodeBarcode control is set through its SizeVersion property:

In XAML:

<ig:XamQRCodeBarcode
    x:Name="Barcode"
    Data="Infragistics"
    SizeVersion="Version1" />

In Visual Basic:

Dim Barcode As New XamQRCodeBarcode()
Barcode.Data = "Infragistics"
Barcode.SizeVersion = SizeVersion.Version1

In C#:

XamQRCodeBarcode Barcode = new XamQRCodeBarcode();
Barcode.Data = "Infragistics";
Barcode.SizeVersion = SizeVersion.Version1;
xamBarcode Adding QR Code 01.png

Encoding Mode

QR Code is capable of encoding large numbers of characters using compaction depending on the types of the Data characters. The symbology can also encode JIS Kanji characters by setting EncodingMode to Kanji (only Kanji characters are encoded).

Note
Note:

The current version of the XamQRCodeBarcode does not support platform specific characters (encoded with 4 bytes).

When the XamQRCodeBarcode control has set encoding mode to Undefined, the control internally switches between modes in order to achieve the most efficient compaction for the type of the characters’ data.

You can explicitly set the compaction mode for the XamQRCodeBarcode control’s data by its EncodingMode property:

In XAML:

<ig:XamQRCodeBarcode
    x:Name="Barcode"
    Data="123"
    EncodingMode="Numeric" />

In Visual Basic:

Dim Barcode As New XamQRCodeBarcode()
Barcode.Data = "123"
Barcode.EncodingMode = EncodingMode.Numeric

In C#:

XamQRCodeBarcode Barcode = new XamQRCodeBarcode();
Barcode.Data = "123";
Barcode.EncodingMode = EncodingMode.Numeric;
xamBarcode Adding QR Code 05.png

Extended Channel Interpretation Number

The XamQRCodeBarcode control supports ECI – this means that the control can encode data from character sets other than the default one (ISO/IEC 8859-1). The ECI code is set through the XamQRCodeBarcode control’s EciNumber property.

Refer to the table at the bottom of the topic, containing the supported ECI values and their corresponding character sets. Note that when EciNumber is set to -1 (its default value), the character values and assignments are associated with the default ECI and the ECI protocol is not used in the data encoding. Note that the XamQRCodeBarcode control encodes only characters of the specified character set.

Assume that the data to be encoded is in Greek, using character set ISO/IEC 8859-7 (ECI 000009):

In XAML:

<ig:XamQRCodeBarcode x:Name="Barcode"
                     EciNumber="9"
                     Data="ΑΒΓΔΕ"
                     EciHeaderDisplayMode="Show"/>

In Visual Basic:

Dim Barcode As New XamQRCodeBarcode()
Barcode.EciNumber = 9
Barcode.Data = "ΑΒΓΔΕ"
EciHeaderDisplayMode = HeaderDisplayMode.Show

In C#:

XamQRCodeBarcode Barcode = new XamQRCodeBarcode();
Barcode.EciNumber = 9
Barcode.Data = "ΑΒΓΔΕ";
EciHeaderDisplayMode = HeaderDisplayMode.Show;
xamBarcode Adding QR Code 07.png

FNC1 mode

FNC1 mode is used to specify the format of the encoded data. You can choose the Gs1 mode to designate that the data is formatted in accordance with the GS1 General Specifications or Industry mode for data formatted in accordance with specific industry application previously agreed upon by AIM Inc. FNC1 mode applies to the entire symbol and is not affected by subsequent mode indicators.

The mode is set through XamQRCodeBarcode control’s Fnc1Mode property.

In XAML:

<ig:XamQRCodeBarcode
    x:Name="Barcode"
    Fnc1Mode="Gs1"
    Data="(15)970331" />

In Visual Basic:

Dim Barcode As New XamQRCodeBarcode()
Barcode.Fnc1Mode = Fnc1Mode.Gs1
Barcode.Data = "(15)970331"

In C#:

XamQRCodeBarcode Barcode = new XamQRCodeBarcode();
Barcode.Fnc1Mode = Fnc1Mode.Gs1;
Barcode.Data = "(15)970331";
xamBarcode Adding QR Code 02.png

For the GS1 General Specification codes, see the table at the bottom of this article.

Application Indicator

The application indicator property value is used when XamQRCodeBarcode control’s Fnc1Mode property is set to Industry. It identifies the relevant specification by AIM Inc.

Note
Note:

XamQRCodeBarcode does not support Structured Append mode and Micro QR Code format. The features will be implemented in the future versions of the control.

Sample Images With Code Declaration:

In XAML:

<ig:XamQRCodeBarcode
    x:Name="Barcode"
    Data="http://ko.infragistics.com" />

In Visual Basic:

Dim Barcode As New XamQRCodeBarcode()
Barcode.Data = "http://ko.infragistics.com"

In C#:

XamQRCodeBarcode Barcode = new XamQRCodeBarcode();
Barcode.Data = "http://ko.infragistics.com";
xamBarcode Adding QR Code 03.png

In XAML:

<ig:XamQRCodeBarcode
    x:Name="Barcode"
    Data="愛"
    EncodingMode="Kanji" />

In Visual Basic:

Dim Barcode As New XamQRCodeBarcode()
Barcode.Data = "愛"
Barcode.EncodingMode = EncodingMode.Kanji

In C#:

XamQRCodeBarcode Barcode = new XamQRCodeBarcode();
Barcode.Data = "愛";
Barcode.EncodingMode = EncodingMode.Kanji;
xamBarcode Adding QR Code 08.png

Supported ECI Numbers

ECI Number ISO Character Set

0

CP 437

1

ISO-8859-1

2

CP 437

3

ISO-8859-1

4

ISO-8859-2

5

ISO-8859-3

6

ISO-8859-4

7

ISO-8859-5

8

ISO-8859-6

9

ISO-8859-7

10

ISO-8859-8

11

ISO-8859-9

13

ISO-8859-11

15

ISO-8859-13

17

ISO-8859-15

20

Shift JIS

21

Windows-1250

22

Windows-1251

23

Windows-1252

24

Windows-1256

25

UTF-16

26

UTF-8

27

ISO-646-US

28

Big5

29

GB 2312

30

KSC-5601