Does anyone know how I can make a Tab
a NavigationPage
? Basically the problem I have is that I have a view I navigate to from one of the Xamarin Shell tabs.
I am using Prism Mvvm so I have OnNavigatedTo()
in the view I navigate to passing an object so I can populate the view. This method is never called because the Xamarin Shell Tab
is not wrapped in a NavigationPage. As these tabs are created in AppShell.xaml
I do not know how to do this.
Any help is much appreciated, thanks!
AppShell.xaml Tab page sample
<Tab x:Name="TestView" Title="Home" Icon="test.png">
<ShellContent ContentTemplate="{DataTemplate local:TestView}" Style="{StaticResource BaseStyle}"/>
</Tab>
I have tried:
AppShell.xaml with NavigationPage
<Tab x:Name="TestView" Title="Home" Icon="test.png">
<ShellContent>
<NavigationPage>
<x:Arguments>
<local:HomeView/>
</x:Arguments>
</NavigationPage>
</ShellContent>
</Tab>