Symbology Customization in WinUI Barcode

Each Barcode symbology can be associated with optional settings that may affect the specific bar code.

1D Barcode settings

EnableCheckSum

The EnableCheckSum property enables the redundancy check using a check digit, the decimal equivalent of a binary parity bit. It consists of a single digit computed from the other digits in the message.

<syncfusion:SfBarcode.Symbology>  
    <syncfusion:CodabarBarcode EnableCheckSum="True" ShowCheckSum="False" />   
</syncfusion:SfBarcode.Symbology>

ShowCheckSum

The check digit can be shown in the barcode or kept hidden by using the ShowCheckSum property.

<syncfusion:SfBarcode.Symbology>  
    <syncfusion:CodabarBarcode EnableCheckSum="True" ShowCheckSum="True" />   
</syncfusion:SfBarcode.Symbology>

EncodeStartStopSymbols

The EncodeStartStopSymbols property adds Start and Stop symbols to signal a bar code reader that a bar code has been scanned.

<syncfusion:SfBarcode.Symbology>  
    <syncfusion:CodabarBarcode EncodeStartStopSymbols="True" />   
</syncfusion:SfBarcode.Symbology>

2D Barcode settings

DataMatrix Barcode settings

The DataMatrix barcode can be customized using the properties Encoding and MatrixSize.

Encoding

The encoding format of the DataMatrix barcode can be modified using Encoding property to decide on the barcode value to be set.

The DataMatrixEncoding enumeration has the following four encoding,

  • ASCII
  • ASCIINumeric
  • Auto
  • Base256
<syncfusion:SfBarcode.Symbology>  
    <syncfusion:DataMatrixBarcode Encoding="ASCIINumeric" />
</syncfusion:SfBarcode.Symbology>

MatrixSize

The MatrixSize property allows user to specify the size of the barcode from a set of predefined sizes available in the DataMatrixSize enumeration.

<syncfusion:SfBarcode.Symbology>  
    <syncfusion:DataMatrixBarcode MatrixSize="Size104x104" />
</syncfusion:SfBarcode.Symbology>

Data Matrix Size Table

Data Matrix Size Description
Auto Size is chosen based on the input data
Size10x10 Square matrix with 10 rows and 10 columns.
Size12x12 Square matrix with 12 rows and 12 columns.
Size14x14 Square matrix with 14 rows and 14 columns.
Size16x16 Square matrix with 16 rows and 16 columns.
Size18x18 Square matrix with 18 rows and 18 columns.
Size20x20 Square matrix with 20 rows and 20 columns.
Size22x22 Square matrix with 22 rows and 22 columns.
Size24x24 Square matrix with 24 rows and 24 columns.
Size26x26 Square matrix with 26 rows and 26 columns.
Size32x32 Square matrix with 32 rows and 32 columns.
Size36x36 Square matrix with 36 rows and 36 columns.
Size40x40 Square matrix with 40 rows and 40 columns.
Size44x44 Square matrix with 44 rows and 44 columns.
Size48x48 Square matrix with 48 rows and 48 columns.
Size52x52 Square matrix with 52 rows and 52 columns.
Size64x64 Square matrix with 64 rows and 64 columns.
Size72x72 Square matrix with 72 rows and 72 columns.
Size80x80 Square matrix with 80 rows and 80 columns.
Size88x88 Square matrix with 88 rows and 88 columns.
Size96x96 Square matrix with 96 rows and 96 columns.
Size104x104 Square matrix with 104 rows and 104 columns.
Size120x120 Square matrix with 120 rows and 120 columns.
Size132x132 Square matrix with 132 rows and 132 columns.
Size144x144 Square matrix with 144 rows and 144 columns.
Size8x18 Rectangular matrix with 8 rows and 18 columns.
Size8x32 Rectangular matrix with 8 rows and 32 columns.
Size12x26 Rectangular matrix with 12 rows and 26 columns.
Size12x36 Rectangular matrix with 12 rows and 36 columns.
Size16x36 Rectangular matrix with 16 rows and 36 columns.
Size16x48 Rectangular matrix with 16 rows and 48 columns.

QRBarcode settings

The QRBarcode settings allows users to modify the version, error correction level and input mode of the QRBarcode.

QRVersion

The QR Barcode uses QRVersion property to decide on the version from 1 to 40 using QRBarcodeVersion enumeration where Version 1 measures 21 modules x 21 modules, Version 2 measures 25 modules x 25 modules and so on increasing in steps of 4 modules per side up to Version 40 which measures 177 modules x 177 modules. By default, the QR Version is Auto, which will automatically set the version according to the input text length.

<syncfusion:SfBarcode.Symbology>   
    <syncfusion:QRBarcode QRVersion="Version01" />
</syncfusion:SfBarcode.Symbology>

ErrorCorrectionLevel

The QR Barcode uses ErrorCorrectionLevel property to generate a series of error correction codewords which are added to the data code word sequence in order to enable the symbol to withstand damage without loss of data. There are four user–selectable levels of error correction. By default the property value is Low.

<syncfusion:SfBarcode.Symbology>   
    <syncfusion:QRBarcode ErrorCorrectionLevel="Quartile" />
</syncfusion:SfBarcode.Symbology>

Error Correction Level Table

Error Correction Level Recovery Capacity % (approx.)
Low 7
Medium 15
Quartile 25
High 30

InputMode

The QR Barcode uses InputMode property to decide the supported character set for value. The default value is BinaryMode.

The QRInputMode enumeration has following values.

  • NumericMode
  • AlphaNumericMode
  • BinaryMode
<syncfusion:SfBarcode.Symbology>   
    <syncfusion:QRBarcode InputMode="AlphaNumericMode" />
</syncfusion:SfBarcode.Symbology>

Input Mode Table

Input Mode Possible characters
Numeric Mode 0,1,2,3,4,5,6,7,8,9
Alphanumeric Mode 0–9, A–Z (upper-case only), space, $, %, *, +, -,., /, :
Binary Mode Shift JIS characters