Merge simplicity of Tabbar and Flyout with simply changing root page in MasterDetailPage's Detail

BartKopBartKop Member

Hi
My scenario assumes:

  • in left menu there is the ContetView (explained below)
  • in left menu there are also nice FlyoutItems or MenuItems
  • there are some items in bottom bar

(I have nice image of this hierarchy, but I new user and page do not allow to place links)
The ContentView's content (left menu's header) has a object hierarchy like:

eshopMenuContainer{
    menuElementContainer{

        elementTitle,
        ElementCategoriesContainer{

            category1Title,
            AssortmentContainer{
                assortment1String,
                assortment2String
            },

            category2Title,
            AssortmentContainer{
                assortment1String,
                assortment2String
            }

        },

        elementTitle,
        ElementCategoriesContainer{

            category1Title,
            AssortmentContainer{
                assortment1String,
                assortment2String
            },

            category2Title,
            AssortmentContainer{
                assortment1String,
                assortment2String
            }

        }

    }
}

Each container is StackLayout and each title is Label.
Default all ElementCategories are hidden.
Tapped on each title label expand or hide their StackLayout.
Tapped on each assortment: navigated in human language to AssortmentPage; created new NavigationPage with AssortmentPage as a root on Detail of MasterDetailPage.

I want to use Shell with its functionalities with possibility to open a page as a navigation root that is not in Shell Visual Hierarchy by tapping assortments labels from header.
Do I have to give up Shell and continue with only MasterDetailPage or there is a way to solve this problem using Shell?

Best regards, Bartosz

Answers

  • UnreachableCodeUnreachableCode USMember ✭✭✭

    Hi @BartKop. To do what I think you're talking about, i.e. use a navigation hierarchy with back buttons, etc, I wasn't able to use GoToAsync like the Shell docs suggest. I still had to use

            `await Shell.Current.Navigation.PushAsync(new DetailPage(), false);`
    

    I feel like this kind of ruins the point of the routing offered in Shell. But my app isn't far along enough yet to figure out if this is a problem. However, given the strengths of routing are to go any where in the app and offer way more complicated flows, I think using PushAsync means I won't have this option.

Sign In or Register to comment.