public PopupBarcodeScannerService(IPopupNavigation popupNavigation)
        {
            PopupNavigation = popupNavigation;

            Padding = GetDefaultPadding();

            _scannerView = new ZXingScannerView
            {
                AutomationId      = "zxingScannerView",
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions   = LayoutOptions.FillAndExpand,
                Options           = GetScanningOptions(),
            };

            var overlay = GetScannerOverlay();

            var grid = new Grid
            {
                VerticalOptions   = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
            };

            grid.Children.Add(_scannerView);

            if (overlay != null)
            {
                grid.Children.Add(overlay);
            }

            _controller = new BarcodeScannerController(this);
            Content     = grid;
        }
        public ContentPageBarcodeScannerService()
        {
            _scannerView = new ZXingScannerView
            {
                AutomationId      = "zxingScannerView",
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions   = LayoutOptions.FillAndExpand,
                Options           = GetScanningOptions(),
            };

            var overlay = GetScannerOverlay();

            var grid = new Grid
            {
                VerticalOptions   = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
            };

            grid.Children.Add(_scannerView);

            if (overlay != null)
            {
                grid.Children.Add(overlay);
            }

            _controller = new BarcodeScannerController(this);

            Content = grid;
        }