[Shell] Shell and TabbedPage

LightAndrekLightAndrek USMember
edited July 3 in Xamarin.Forms

Hi guys,

I'm new to Xamarin.Forms application development and decided to get started with the new Shell component.
I understand how routing works and how to navigate between pages but I want to understand if it is possible to do this.

My main shell is composed of a TabBar and 4 elements in this way:
<Shell> <TabBar x:Name="NavigationBottomBar"> <Tab Title="Home" Icon="home.png"> <ShellContent ContentTemplate="{DataTemplate views:HomePage}" /> </Tab> <Tab Title="Cards" Icon="cards.png"> <ShellContent ContentTemplate="{DataTemplate views:CardsPage}" /> </Tab> <Tab Title="Shops" Icon="shops.png"> <ShellContent ContentTemplate="{DataTemplate views:ShopLocatorPage}" /> </Tab> <Tab Title="Profile" Icon="profile.png"> <ShellContent ContentTemplate="{DataTemplate views:ProfilePage}" /> <ShellContent ContentTemplate="{Data Template veiws:SettingsPage}" /> </Tab> </TabBar> </Shell>

And in the .cs file of my Shell register the additional navigations I need:
Routing.RegisterRoute("Cards", typeof(CardsPage)); Routing.RegisterRoute("Cards/CardDetails", typeof(CardDetailsPage));

Within the details page that I open using the navigation function I would like to have another TabBar at the top of the page with 3 sub-pages and here the "problem" arises.

In ContentPage I cannot insert an additional TabBar.
I tried using a TabbedPage instead of ContentPage and it works correctly even if the page title's shadow covers part of the tabs (in android), which doesn't happen using the shell directly as on the 4 page shown in the code above.

At present, is it possible to do what I did via the TabPage control using only the Shell, to avoid doing the same thing but in different ways within the same app?

Answers

Sign In or Register to comment.