Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 81910

Can't change App Shell Tab to Navigation Page

$
0
0

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>

Viewing all articles
Browse latest Browse all 81910

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>