We have made a decision that using Shell navigation is just a little restrictive and cumbersome and we are going to utilize our own Flyout pages which are not allowed in shell apps BUT when we move to create a new app, there is no option to create a shell/non shell app??? So we created default app then simply deleted the appshell object which seems to work BUT is this all that is required in order for us to utilize our own flyout pages?
Its as simple as changing MainPage = new AppShell();
in App.xaml.cs, to whatever you want:
MainPage = new NavigationPage(new MyFirstPage());
if you want to use NavigationPage's navigation features.MainPage = new MyFirstPage();
, and then roll your own page changes via Application.Current.MainPage = new SomeOtherPage();
.Substitute the appropriate class name for MyFirstPage
. E.g. in the Maui template, it is class MainPage
, so use MainPage
if you want to immediately test a new Maui project.
Note that both these solutions involve explicitly calling new YourPageNameHere()
rather than relying on Dependency Injection. This may affect code you need to write elsewhere (compared to Maui examples you'll find, which tend to rely on DI).