thanks for your help in advance. I am working on a Forms Shell App a few days now. My UI is data driven in a lot of aspects and what I am trying to accomplish ist a page that show multiple tabs on tob depending on the model it has.
In other words I try to accomplish the same layout as in the Shells Demo app:
<FlyoutItem Route="animals"
Title="Animals"
FlyoutDisplayOptions="AsSingleItem">
<Tab Title="Domestic"
Route="domestic"
Icon="paw.png">
<ShellContent Route="cats"
Style="{StaticResource DomesticShell}"
Title="Cats"
Icon="cat.png"
ContentTemplate="{DataTemplate views:CatsPage}" />
<ShellContent Route="dogs"
Style="{StaticResource DomesticShell}"
Title="Dogs"
Icon="dog.png"
ContentTemplate="{DataTemplate views:DogsPage}" />
</Tab>
</FlyoutItem>
But starting from an existing link in the FlyoutMenu. Like the level of the "Domestic" tab above, which when navigatet to creates those two or more Shell top tapped pages.
I am aware I could use a TappedPage as ShellContent, but TappedPages get styled a little different I was wondering if i could accomplish this with "native" Shell features.
I already tried something like:
ShellSection tab1 = new ShellSection
{
Title = "Tab1"
};
tab1.Items.Add(new ShellContent() { Title = "Test1", Content = new ContentPage() { Title = "Test1" } });
tab1.Items.Add(new ShellContent() { Title = "Test2", Content = new ContentPage() { Title = "Test2" } });
var current = AppShell.Current.CurrentItem;
current.Items.Add(tab1);
but this also adds another entry in the bottom tabs bar and the flyout menu as well, what i don't want.
To be more clear I try to explain it with mockup screenshots.
Asume we have the following flyoutmenu where Domestic entry.
This domestic entry leads to a page whichs viewmodel provides a collection of data that should be displayed in tabs.
As you see, this pages provides a Link in the title view which opens a popup to change the selected element and should refresh/change the displayed data for example to have three tabs.
I hope its more clear now.
EDIT:
The comments till now brought me one step further. With the following code I accomplish to get the desired top tabs.
var current = AppShell.Current.CurrentItem;
var currentSection = current.CurrentItem;
//currentSection.Items.Clear();
currentSection.Items.Add(new CatsPage() { Title = "Tab1"} ); ;
currentSection.Items.Add(new ShellContent() { Title = "Tab2", Content = new CatsPage() });
But its still not perfect - in the added pages the botton tab bar is hidden, any solution for that?





