i have a parent shell tabbed page. i want to be able to navigate from one of the contentPage of this parent page to another shell tabbed page.
How do i navigate to a shell tabbed page from a parent shell tabbed page
Asked Answered
Navigation can be performed by specifying a valid absolute URI as an argument to the GoToAsync method: https://learn.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/shell/navigation#perform-navigation
On OnItemSelected
method, invoke the code below.
await (App.Current.MainPage as Xamarin.Forms.Shell).GoToAsync("//tabbar/tab/about", true);
AppShell.xaml: Set the route.
<TabBar Route="tabbar">
<Tab Title="Browse" Icon="tab_feed.png">
<ShellContent ContentTemplate="{DataTemplate local:ItemsPage}" />
</Tab>
<Tab Title="About" Icon="tab_about.png" Route="tab">
<ShellContent Route="about" ContentTemplate="{DataTemplate local:AboutPage}" />
</Tab>
</TabBar>
Thanks sir, but this is not what i meant. i mean i want to navigate from a tabbed page to another tabbed page with shell –
Temporal
In the sample, I have two tabbed pages, one is Browse and the other is About. When I click the First item in the Browse tabbed page, it navigate to another About tabbed page. If I missunderstand, please feel free let me know. –
Irishman
Thanks for the reply sir . But i can see u just have a tabbed page with 2 tabs. so u moving from one tab to the another. what i mean is navigating totally from this tabbed page to another tabbed page with its own tabs. –
Temporal
yea, I have two tabbed pages. But what do you mean
navigating totally from this tabbed page to another tabbed page with its own tabs
? What is the own tabs? Could you provide more details? –
Irishman @Wendy Zang - MSFT , may be Godfred Boateng trying to say that how to navigate from Shell TabBar page to normal page of TabbedPage i.e., learn.microsoft.com/en-us/xamarin/xamarin-forms/… –
Lacrosse
GoToAsync("//tabbar/about" is the correct answer –
Hallah
© 2022 - 2024 — McMap. All rights reserved.