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
I was trying to do the same thing - what I've wound up doing is a bit of a hack, but does work and keep the back button of page 2 going to page 1.
Basically,
var page3 = _navi.NavigationStack.FirstOrDefault(p => p is Page3Type);
if(page3 != null)
{
_navi.RemovePage(page3);
}
await navi.PopAsync();
What this does is first, if present, remove page3. Now that that's gone, it pops, and you're back at page 2.