MAUI Shell App Flyout page when not the first page

Deej 21 Reputation points

I have an app I am trying to build using MAUI. I want to use a flyout on a page but its not the first page

My app has 3 pages consisting of :-

  • Page 1. is a login page, which navigates to
  • Page 2. which is a summary page, and depending on what you select there, you then go to
  • Page 3. which has the flyout on it

None-Shell Flyout has a bug and it currently doesn't work in Android, so I thought I would try Shell.

But from all the examples I can find, there is not a single one that shows flyout on any other page other than the first page.
It seems like it's always assumed you want your app to start with the flyout navigation and I don't.

So how do I achieve this please, can anyone help me out here?

A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,985 questions
{count} votes

Accepted answer
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 37,111 Reputation points Microsoft Vendor


    You could refer to the following steps to setting the Shell.

    Step1. In your AppShell.xaml, please set Page3 as your ShellContent.

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

    Step3. In your login page, you need to use await App.Current.MainPage.Navigation.PushAsync(new YourPage2()); to turn to the Page2.

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

    Best Regards,

    Alec Liu.

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

0 additional answers

Sort by: Most helpful