Keep Tabbed Pages Menu when Pushing a Page

BrianLKBrianLK Member ✭✭
edited April 4 in Xamarin.Forms

I need to build an App which must contain Tabbed Pages and Hamburger menu.

Until now, I managed to have my MainPage as a MasterDetailPage, where my DetailPage is the TabbedPage.

My TabbedPage has 3 tabs: Page "A", Page "B", and Page "C".

Inside my Page "B" is a button that pushes a new page "D" onto the stack (which is not listed in the Tabbed Page Menu).
The Page "D" shows the navigation bar correctly, but does not show the Tabbed Page Menu with the three pages.

What I want is to show the Tabbed Page Menu in the Page D. The Tabbed Page Menu has to be visible in all the pages pushed in the app

What I tried:
In the Tabbed Page, if I wrap the "Page B" tab inside this code:
<NavigationPage Title="Page B"> <x:Arguments> <local:PageB /> </x:Arguments> </NavigationPage>

and I navigate to page "B" > "D" : shows the Tabbed Page Menu, but shows 2 Navigation Bars. I can opt for hiding the Navigation Bar inside the Page "D", but I really want to look for another solution because I need to use the Navigation Bar inside Page D to put Toolbar Items.

Is there any other way to show the Tabbed Page Menu?

Another option is to remove the MasterDetailPage and add the Hamburger Menu as a Tabbed Page, but I dont know how to add the sidebar when it is tapped.

Posts

  • RHudsonRHudson CAMember ✭✭✭
    edited April 4

    @BrianLK
    You can do this with FreshMvvm

    Scroll way down to "Multiple Navigation Services". Use a nested tabbed nav stack on the detail side of your parent master/detail page.

  • BrianLKBrianLK Member ✭✭

    @RHudson said:
    @BrianLK
    You can do this with FreshMvvm

    Scroll way down to "Multiple Navigation Services". Use a nested tabbed nav stack on the detail side of your parent master/detail page.

    Thanks @RHudson for the answer. I know this is too much to ask, but is there any chance to do this without any framework? Because I need to implement this in an existing medium/large sized project and its a bit complicated to integrate a framework from the scratch.

  • RHudsonRHudson CAMember ✭✭✭

    @BrianLK

    Sorry, I'm not sure offhand. I use FreshMVVM in all my projects because:

    1) it handles advanced navigation scenarios - which is precisely what you need

    2) VM-to-VM navigation

    3) I like how I can push a Viewmodel and pass init data.

    It's not complicated to setup. In fact it would simplify things for you. Have a look at it.

    Without a framework? I'll let someone else answer.

  • BrianLKBrianLK Member ✭✭

    @RHudson said:
    @BrianLK

    Sorry, I'm not sure offhand. I use FreshMVVM in all my projects because:

    1) it handles advanced navigation scenarios - which is precisely what you need

    2) VM-to-VM navigation

    3) I like how I can push a Viewmodel and pass init data.

    It's not complicated to setup. In fact it would simplify things for you. Have a look at it.

    Without a framework? I'll let someone else answer.

    Thank you anyway for your answer. I will take a deeper look at FreshMVVM.

Sign In or Register to comment.