I would like to move the Cats and Dogs ShellContent objects, as seen in the following classic example, to another (Domestic) XAML Page while keeping the navigation layout as is (two tabs to the top).
<Shell xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:views="clr-namespace:Xaminals.Views"
x:Class="Xaminals.AppShell">
<TabBar>
<Tab Title="Domestic" Icon="paw.png">
<ShellContent Title="Cats"
ContentTemplate="{DataTemplate views:CatsPage}" />
<ShellContent Title="Dogs"
ContentTemplate="{DataTemplate views:DogsPage}" />
</Tab>
<Tab Title="Monkeys" Icon="monkey.png">
<ShellContent ContentTemplate="{DataTemplate views:MonkeysPage}" />
</Tab>
</TabBar>
</Shell>
Here is what I have tried so far, but first, I’m not sure if this is the best practice to accomplish this goal, and second, for some reason the Cats and Dogs tabs turned into items under a left side minimized menu page.
<Shell xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Xaminals.Views.DomesticPage">
<ShellContent Title="Cats"
ContentTemplate="{DataTemplate views:CatsPage}" />
<ShellContent Title="Dogs"
ContentTemplate="{DataTemplate views:DogsPage}" />
</Shell>
Refer to the DomesticPage in AppShell:
<TabBar>
<Tab Title="Domestic" Icon="paw.png">
<ShellContent ContentTemplate="{DataTemplate views:DomesticPage}" />
</Tab>
<Tab Title="Monkeys" Icon="monkey.png">
<ShellContent ContentTemplate="{DataTemplate views:MonkeysPage}" />
</Tab>
</TabBar>