I'm getting the error below, yet i think my xaml and .cs file are correct. Microsoft.Maui.Platform.HandlerNotFoundException: 'Handler not found for view ZXing.Net.Maui.Controls.CameraBarcodeReaderView.'
I think this means that the handler i have for my camerabarreaderview isn't found, but it appears to be there. Any idea what I am doing wrong? i'm hoping another set of eyes will be helpful. TIA
xaml:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:zxing="clr-namespace:ZXing.Net.Maui.Controls;assembly=ZXing.Net.MAUI"
x:Class="ScanAndScoringMauiApp.Pages.ScanPage"
Title="ScanPage">
<Grid RowDefinitions="1*,3*,1*">
<zxing:CameraBarcodeReaderView
Grid.Row="0" Grid.RowSpan="3"
x:Name="barcodeView"
BarcodesDetected="barcodeView_BarcodesDetected"
/>
<Grid
Grid.Row="0"
BackgroundColor="#aa000000">
<Label Grid.Row="2" Text="Top text..." HorizontalOptions="Center" VerticalOptions="Center" TextColor="White" />
</Grid>
<Grid
Grid.Row="3"
BackgroundColor="#aa000000"
Padding="20"
ColumnDefinitions="Auto,*,Auto">
<Button Text="️" Grid.Column="0" BackgroundColor="#aa000000" CornerRadius="8" BorderColor="Black" Clicked="Button_Clicked" />
<zxing:BarcodeGeneratorView
x:Name="barcodeGenerator"
Grid.Column="1"
HorizontalOptions="Center"
VerticalOptions="Center"
HeightRequest="100"
WidthRequest="100"
ForegroundColor="DarkBlue"
Format="QrCode"
Value="Bla"
BarcodeMargin="1" />
<Button Text="" Grid.Column="2" BackgroundColor="#aa000000" CornerRadius="8" BorderColor="Black" Clicked="Button_Clicked_1" />
</Grid>
</Grid>
</ContentPage>
my code file:
namespace ScanAndScoringMauiApp.Pages;
public partial class ScanPage : ContentPage
{
public ScanPage()
{
InitializeComponent();
}
private void Button_Clicked(object sender, EventArgs e)
{
}
private void Button_Clicked_1(object sender, EventArgs e)
{
}
private void barcodeView_BarcodesDetected(object sender,
ZXing.Net.Maui.BarcodeDetectionEventArgs e)
{
}
}