I have navigation stack like this:
Page1 -> Page2 -> Page3 -> Page4 -> Page5 -> Page6
And I want to Navigate TO Page2 FROM Page6 and clear rest of pages (Page3, Page4, Page5)
How can I do this?
Thanks in advance!
When you want to navigate back a count of pages, you need to remove count pages from the navigation stack:
for (var i = 1; i < countPagesToRemove; i++)
{
Navigation.RemovePage(Navigation.NavigationStack[Navigation.NavigationStack.Count - 2]);
}
await Navigation.PopAsync();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With