private async void ToolbarItem_Clicked(object sender, EventArgs e)
 {
     vmBarcode = new BarcodeScannerViewModel();
     vmBarcode.OnResultScanHandler += VmBarcode_OnResultScanHandler;
     var formBarcode = new BarcodeScanner()
     {
         BindingContext = vmBarcode
     };
     await Shell.Current.Navigation.PushModalAsync(formBarcode);
 }
        public BarcodeScanner()
        {
            InitializeComponent();
            scanView.Options = new ZXing.Mobile.MobileBarcodeScanningOptions
            {
                TryHarder       = true,
                PossibleFormats = new List <ZXing.BarcodeFormat>
                {
                    ZXing.BarcodeFormat.EAN_8, BarcodeFormat.EAN_13, ZXing.BarcodeFormat.QR_CODE
                },
                DelayBetweenContinuousScans = 100,
                AutoRotate = false,
            };

            scanView.AutoFocus(100, 100);
            BindingContext = new BarcodeScannerViewModel();
        }