The XamBarcode™ control exposes the following events:
The DataChangedEventArgs object’s NewData property conveniently allows you to get the value of the XamBarcode control’s Data property that has just been changed.
You will handle the DataChanged event.
Add a XamBarcode control to your application . For more info on this, see Adding Barcode Using XAML Code or Adding Barcode In Code-Behind .
Handle the event:
In XAML:
<ig:XamQRCodeBarcode x:Name="Barcode" DataChanged="Barcode_DataChanged"/>
In C#:
using Infragistics.XamarinForms.Controls.Barcodes;
using Infragistics.Controls.Barcodes.Implementation;
private void Barcode_DataChanged(object sender, DataChangedEventArgs e)
{
string newData = e.NewData;
}
Save and run your application.
In XAML:
<ig:XamQRCodeBarcode x:Name="Barcode" Data="xamBarcode" EncodingMode="Numeric" />
In C#:
var barcode = new XamQRCodeBarcode
{
Data = "xamBarcode",
EncodingMode = EncodingMode.Numeric,
};