VintaSoft Barcode .NET SDK v12.0 for Xamarin
In This Topic
    Get barcode image
    In This Topic

    Example: Here is an example that shows how to get a barcode as Android.Graphics.Bitmap object.

    // The project, which uses this code, must have references to the following assemblies:
    // - Vintasoft.XamarinBarcode.Android
    
    // create the barcode writer
    Vintasoft.XamarinBarcode.BarcodeWriter barcodeWriter = new Vintasoft.XamarinBarcode.BarcodeWriter();
    
    // set the barcode writer settings
    barcodeWriter.Settings.Barcode = Vintasoft.XamarinBarcode.BarcodeType.Code128;
    barcodeWriter.Settings.Value = "012345abcde";
    
    // get barcode image as Android.Graphics.Bitmap object
    Android.Graphics.Bitmap bitmap = barcodeWriter.GetBarcodeAsBitmap();