Forum Xamarin Xamarin.Forms

Shell navigation not retaining hamburger menu

ShaunWalshShaunWalsh USMember ✭✭

Well, as the title suggest when I navigate from the main pages established in my flyout menu I lose my hamburger menu, it is simply replaced by a back button. Is it possible to maintain the menu button for easy navigation back to core pages of my app?

Tagged:

Best Answer

Answers

  • jezhjezh Member, Xamarin Team Xamurai

    The shell navigation with the hamburger menu is predesigned and it is the main page of shell app .

    When you use ShellContent under Shell element directly, it maintain the menu button for navigation back . For example:

    <Shell xmlns="http://xamarin.com/schemas/2014/forms"
           xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
           xmlns:controls="clr-namespace:Xaminals.Controls"
           xmlns:views="clr-namespace:Xaminals.Views"
           FlyoutBackgroundImage="photo.jpg"
           FlyoutBackgroundImageAspect="AspectFill"
           FlyoutHeaderBehavior="CollapseOnScroll"
           Navigating="OnNavigating"
           Navigated="OnNavigated"
           x:Class="Xaminals.AppShell">
    
          <!--other code-->
            <ShellContent Route="about"
                  Style="{StaticResource AboutShell}"
                  Title="About"
                  Icon="info.png"
                  ContentTemplate="{DataTemplate views:AboutPage}" />
    
      </Shell>
    

    You can refer to the official sample of shell : https://github.com/xamarin/xamarin-forms-samples/tree/master/UserInterface/Xaminals

  • jezhjezh Member, Xamarin Team Xamurai

    Hi ShaunWalsh , hope you are doing well. I’d like to follow up with you to see if there is any progress. Thanks!

  • ShaunWalshShaunWalsh USMember ✭✭

    Hello, I actually went ahead and switched to a MasterDetail design instead. This weekend I'll give this a go and see if it works on its own, but the Master Detail flow seems to work better for what I'm doing anyways. Thanks for the help though.

Sign In or Register to comment.