-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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: Add multi page sample #117
Comments
Anyone found the solution for navigation yet? |
Hi there, for anyone having a similar problem, have a look at the linked repository: https://github.com/davidortinau/WeatherTwentyOne It's a weather app implemented using Maui and it already contains navigation. Basically the CreateWindow function needs to contain something similar to this:
Since I believe that it is still a good idea to have multiple pages in the official samples I leave the issue open for now. |
But neither With XamForms, I could simply have: public App()
{
InitializeComponent();
MainPage = new MainPage();
} and have With MAUI, |
It would be really helpful if the HelloMaui sample could be extended to have multiple pages.
I was testing out the HellMaui sample and everything works fine so far. I can run the project on iOS, Android and Mac, I can create ViewModels, bind them to my ContentPage (Basically everything that I'm used to from Xamarin.Forms.) and so on.
However I'm having trouble when it comes to the navigation between pages. The workflow seems to have changed quiet a bit, now that Windows are used. In Xamarin.Forms I could just set the MainPage to be a NavigationPage and I was good to go. Now I'm a bit lost on how to implement similar behavior. Simply changing the IPage during runtime in the Window that is being created on startup does not seem to have any effect.
Would be nice if someone could help me out and point me in the right direction or give me a small example on how I should approach the navigation in MAUI.
Best Regards
The text was updated successfully, but these errors were encountered: