How do you Add a FlyoutPage that isnt the starting point for your Maui Application using Shell

202 Views Asked by At

I I was wondering if anyone had any good examples of using a flyout page later on in the app with shell ? Im in the process of converting my xamain app and i have a couple of pages before i get to my flyout

(main page) -> (Page1)->(Page2)->(FlyoutPage)

Theres some stuff online where you would just make the flyout your main page and simply disable the flyoutbehavior for some of the inital pages but I cant do that here because i would need to keep this flow as the user needs to be able to back out of the FlyoutPage back to Page2 and then Go back again to Page1 if they want to or Foward to that flyout page again

My flyout page doesnt do any additional navigating the slide out is its own ContentPage and then I would have another Content Page always being presented.... this used to be a MasterDetailPage back in the Xamarin days but has since been obselete

Any github examples or youtube videos would be helpful.

1

There are 1 best solutions below

0
On

First, in your AppShell.xaml, please set the pages as your ShellContent.

Second, setting MainPage as MainPage = new NavigationPage(new YourPage1()); in the App.xaml.cs.

Last, In the Page3.xaml.cs, you could use App.Current.MainPage = new AppShell(); to turn to your Page2 with the Flyout.