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:
NavigationPag
This worked exceptionally well for me:
I set up a counter and threw a DisplayAlert to find out how many pages I needed to remove
var x = Navigation.NavigationStack.Count();
DisplayAlert("Page Count", x.ToString(), "OK");
And then used that to remove the number I needed to fall back.
Navigation.RemovePage(Navigation.NavigationStack[Navigation.NavigationStack.Count - 2]);
await Navigation.PopAsync();