AvaloniaMauiHybrid
AvaloniaMauiHybrid copied to clipboard
Using MAUI control causes build error: Error AVLN:0004 Avalonia: Unable to resolve suitable regular or attached property Name on type ZXing.Net.MAUI.Controls
I am creating a POC and tried to:
- use ZXIng.NET.MAUI as barcode reader on Android and IOS
- and try to implement it somehow differently on Windows.
However, I cannot even get it to compile - once I add the MAUI control, I get a build error. Note: This does nothappen, if I use a built-in MAUI control such as "<mauiControls:Button />"
Am I doing anything wrong here?
Repro is available here: https://github.com/gentledepp/POC_AvaloniaMauiApp01/tree/repro/mauicontrol
Just try to compile, and you will get:
You can't have a x:Name on non-Avalonia controls. That's expected for now.
As a workaround, you can add x:Name on a host control, and get child from it in c# code.
oops... did I overread something? Or shall I add a PR to get this into the docs?
Also: I am working on an extended DI sample - which I could share as a PR with the Avalonia UI general docs (as there is a doc for DI already, but it is too basic for some cases)
And I am working on a sample on how to run MauiHybrid with iOS and Windows side-by-side. (i.e. having Maui controls for iOS and Android, but using Avalonia-only controls for Windows)
Should I share that here or in the AvaloniaUI docs?