0

I'm using ZXing.Net.Mobile.Forms in my project. Tried both FreshMVVM and Prism.

ScannerXamlPage.xaml

<Grid>
    <zxing:ZXingScannerView x:Name="ScannerView"
        Result="{Binding ScanResult, Mode=OneWayToSource}"
        ScanResultCommand="{Binding ProcessBarcodeCommand}"
        IsScanning="{Binding IsScanning}"
        IsAnalyzing="{Binding IsAnalyzing}" />
    <zxing:ZXingDefaultOverlay x:Name="ScannerOverlay"
        TopText="Hold your phone up to the QR code"
        BottomText="Scanning will happen automatically"
        ShowFlashButton="True"/>

This causes RuntimeException: getParameters failed when navigating away from the page, then back to it. Related Github issue.

This workaround solves it for now:

protected override void OnDisappearing()
{
    base.OnDisappearing();
    Content = null;
}

0 Answers0