The XamCode128Barcode™ generates the high-density alpha-numeric variable-length Code 128 symbology. It allows encoding of all 256 standard ASCII characters as well as 4 special symbol characters- FNC1, FNC2, FNC3 and FNC4*:
FNC1 is used in UCC/EAN128 to act as UCC/EAN-128 identifier and field delimiter.
FNC2 is used to tell the barcode reader to store the data and transmit it with the next symbol.
FNC3 is reserved for future use.
FNC4 is used as a latch code word to switch into extended ASCII mode.
During the encoding process XamCode128Barcode internally uses 3 code sets (A, B and C) to generate the shortest possible symbol. Code 128 requires a mandatory checksum character to ensure the data integrity which is not represented in the human readable interpretation. Two Code 128 code symbologies are supported and specified by the CodeType property– Standard and Ucc (also known as UCC/EAN-128).
When CodeType is set to Ucc, the control checks internally if the Data consists of valid Application Identifier(s) with data content with an explicit format (see the table at the bottom). Each Application Identifier should be enclosed in parentheses.
Example:
The XamCode128Barcode from the image has a Data property set to "(11)100518(15)111018(10)17".
Reading and extracting the Data from the example as follows:
The AI (11) indicates that its data content should be 6 numerical digits and it is Production Date (YYMMDD);
The value 100518 stands for May 18, 2010;
The second AI - (15) indicates that the data content is Best Before Date (YYMMDD) and should be 6 numerical digits;
The value 111018 stands for October 18, 2011;
The last AI - (10) indicates that the data content is Batch or Lot Number. It should be up to 20 alphanumerical characters long;
The value is 17.
For information about the supported Application Identifier(s) and the format of their corresponding data content see the table at the end of this topic.
In XAML:
<ig:XamCode128Barcode x:Name="Barcode" CodeType="Standard" Data="Code 128" />
In Visual Basic:
Dim Barcode As New XamCode128Barcode() Barcode.Data = "Code 128" Barcode.CodeType = Code128CodeType.Standard
In C#:
XamCode128Barcode Barcode = new UltraCode128Barcode
Barcode.Data = "Code 128";
Barcode.CodeType = Code128CodeType.Standard;
In XAML:
<ig:XamCode128Barcode x:Name="Barcode" CodeType="Ucc" Data="(01)00653216546543" />
In Visual Basic:
Dim Barcode As New XamCode128Barcode() Barcode.Data = "(01)00653216546543" Barcode.CodeType = Code128CodeType.Ucc
In C#:
XamCode128Barcode Barcode = new XamCode128Barcode(); Barcode.Data = "(01)00653216546543"; Barcode.CodeType = Code128CodeType.Ucc;
In XAML:
<ig:XamCode128Barcode x:Name="Barcode" CodeType="Ucc" Data="(11)100518(15)111018(10)17" />
In Visual Basic:
Dim Barcode As New XamCode128Barcode() Barcode.Data = "(11)100518(15)111018(10)17" Barcode.CodeType = Code128CodeType.Ucc
In C#:
XamCode128Barcode Barcode = new XamCode128Barcode(); Barcode.Data = "(11)100518(15)111018(10)17"; Barcode.CodeType = Code128CodeType.Ucc;
Notes:
(a): The following convention is applied:
n - numeric digit
an - any character
n3 - 3 numeric digits
n..3 - up to 3 numeric digits
an..3 - up to 3 characters
The first position of the Format field indicates the length (number of digits) of the Application Identifier. The following values refer to the format of the data content.
Example: n4+n14+an..16 - 4 numeric digits for the AI; 14 numeric digits and up to 16 alphanumeric characters for the data content.
(b): If only year and month are available for YYMMDD, DD must be filled with two zeroes.
(c): The implied point position is indicated by the fourth digit of this Application Identifier. Example:
3100 Net weight in kg without a decimal point;
3102 New weight in kg with two decimal points.