-
Notifications
You must be signed in to change notification settings - Fork 777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAUI support is completely broken in version 5 #969
Comments
@claytonone I will look at it |
Created a pull request into your sample with a fix. I removed the tizen support and added code for the other platforms to work with caliburn.micro. the change that fixed it was this
|
please close the bug if it fixed your issue |
@vb2ae Thanks for looking into this but that doesn't seem to have fixed it (at least on Android and iOS). Try pressing the increment button - notice that it doesn't call the function in the view model and that it doesn't update the label text. Also try injecting |
Sorry I could not get sample to run so I was thinking that was only issue. Looking at the button in Microsoft documentation. I did not see a Tapped event. It works if you use Clicked https://learn.microsoft.com/en-us/dotnet/api/microsoft.maui.controls.button?view=net-maui-9.0
Actually it works on Windows get an error on android |
Sorry yes typo by me, it should have been That makes the click handler work but the label binding from the viewmodel to the view still doesn't work and neither does the navigation service. Regarding the navigation service I notice that |
For the Navigation Service you need to register the NavigationService with dependency injection to have something to inject into the MainViewModel constructor. Change the following in the HomeView.xaml
in the HomeViewModel make the following changes
|
Thanks. this would work in some situations but not all. This method registers the navigation service pretty late so any view models that were created at the same time as The Xamarin Forms version of Caliburn Micro had a much simpler way of doing this. You simply added an override of
Also can you please look into why Thanks! |
It currently doesn't seem possible to create a working MAUI app with Caliburn Micro 5 (5.0.181-beta also tried with latest myget version 5.0.196-beta). I've tried using two different approaches:
using
DisplayRootView
This is what we used to do in Xamarin Forms, however in MAUI this doesn't work at all. View models never get resolved from the container and the flyout page never shows it's menu icon. It does correctly register a navigation page though.
using
DisplayRootViewForAsync
This has different problems but view models do get resolved from the container. However it never registers a navigation page instance so navigation between pages is impossible.
Other problems
The below used to work in an earlier preview version but now
Bind.Model
no longer works at all.cal:Bind.Model="{Binding MainViewModel}"
I've created a very simple repro where this can easily be observed. https://github.com/claytonone/CaliburnMicroMaui
The text was updated successfully, but these errors were encountered: