Issue
In my app I'm pushing pages using a NavigationPage
and at some stage I want to go back to a previous page in the stack. This is my structure:
NavigationPage > Page1 > Page2 > Page3 > Page4
How can I PopAsync
back to Page2 directly from Page4 without going through Page3?
Solution
If you have a count that you would like to pop, this works really well.
for (var counter = 1; counter < BackCount; counter++)
{
Navigation.RemovePage(Navigation.NavigationStack[Navigation.NavigationStack.Count - 2]);
}
await Navigation.PopAsync();
Answered By - Caitlin
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.