Imports Infragistics.Controls.Barcodes
This topic is designed to get you up and running as quickly as possible by describing the basic steps required for adding a XamCode128Barcode™ control to your page .
You will add a basic XamCode128Barcode control to your page .
Create a WPF application.
Add the following NuGet package references to your project:
Infragistics.WPF.Barcodes
For more information on setting up the NuGet feed and adding NuGet packages, you can take a look at the following documentation: NuGet Feeds.
Add the following namespaces in the application.
In Visual Basic:
Imports Infragistics.Controls.Barcodes
In C#:
using Infragistics.Controls.Barcodes;
Choose a barcode symbology. To the UserControl_Loaded event handler, add an instance of the chosen xamBarcode symbology naming it Barcode.
Note: Each barcode symbology is a separate control.
XamBarcode Symbology Types:
In Visual Basic:
Dim Barcode As New XamCode128Barcode()
In C#:
var Barcode = new XamCode128Barcode();
Assign a value to the control’s Data property
In Visual Basic:
Barcode.Data = "Code128"
In C#:
Barcode.Data = "Code128";
Add the instance of conrol to the main view.
In Visual Basic:
Me.LayoutRoot.Children.Add(Barcode)
In C#:
this.LayoutRoot.Children.Add(Barcode);
Save and run your application.