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
If you have a count that you would like to pop, this works really well for me.
for(i=1; i < size; i++)
{
if (Device.OS == TargetPlatform.Android)
{
Navigation.RemovePage(Navigation.NavigationStack[Navigation.NavigationStack.Count - 1]);
}
else
{
Navigation.RemovePage(Navigation.NavigationStack[Navigation.NavigationStack.Count - 2]);
}
}
await Navigation.PopAsync();