Replies: 1 comment
-
My guess is you did something wrong to start with which is why your ViewModel never fired the command. I couldn't tell you what because there is no sample. That said the NavigationService is really not meant to be injected into the Page itself. With Maui it's theoretically possible but definitely not a pattern I will support. My suggestion to you is to figure out why your ViewModel wasn't getting hooked. Remember the FlyoutPage is a special case the "Flyout" even though Maui calls it a Page is not something that gets handled by any sort of DI. This is best hard coded as some Page in the Flyout. You can always use Regions to swap out the menu options in the Flyout. |
Beta Was this translation helpful? Give feedback.
-
is there any problem if I do the following in a FlyoutPage to navigate through the menu pages
I'm doing it in that way because when I try to navigate to a page using the code that appears commented in the image, the registered viewmodel never been fired... and it works doing it like the image... but I don't know if is correct using the INavigationService in a Xaml's CodeBehind or if this could be a problem in the future...
Beta Was this translation helpful? Give feedback.
All reactions