I meet a scenario to navigate from MyTabbedPage/ChildTabPage1/Page1 to MyTabbedPage/ChildTabPage2/Page2 in Xamarin.Forms
Right now, I can only switch between MyTabbedPage/ChildTabPage1 and MyTabbedPage/ChildTabPage2. But I need to navigate directly from MyTabbedPage/ChildTabPage1/Page1 to MyTabbedPage/ChildTabPage2/Page2
I also asked question on stackoverflow
How to achieve this? Thank you very much in advance for your helps.
Answers
MyTabbedPage/ChildTabPage1/Page1
I should write the issue clearer. I want to do deep linking navigation from MyTabbedPage/ChildTabPage1/Page1 to MyTabbedPage/ChildTabPage2/Page2. The solution you provided work functionally but the page.Children[1] is viewed during the navigation. How to make it work like direct navigation from Page1 to Page2?
Is this you want ?
I think in
Page1
, you can useNavigation.PushAsync(new Page2(), true);
directly.no, I want to navigate from ChildTabPage1/Page1 to ChildTabPage2/Page2.
Navigation.PushAsync(new Page2(), true); can't change Tab Page.
The code above change the selected tab ,one more thing is that override the back event of Page2 , check if last page is Page1, if it is , set tab selected index to 0 .