Ever ran into this problem? It appears e.g. if you are on a carousel page and want to open a new page using await Navigation.PushAsync(new myPage());
So instead of using PushAsync, the easiest solution is to use PushModalAsync, like await Navigation.PushModalAsync(new myPage());
Now you might run into another problem: In some cases, myPage might be called via PushAsync and in some cases via PushModalAsync. So if you have a Back-Button on myPage, it might call PopAsync or PopModalAsync.
Check whether to call Pop or PopModal
To find out whether you have to call PopAsync or PopModalAsync, you only have to check the Navigation Stack. If your page is opened as modal, no navigation stack contains 0 elements. Additionally you could also Navigation.ModalStack to see whether it’s a modal window.
public async void OnHeaderBackImageTapped(object sender, EventArgs e)
var stack = Navigation.NavigationStack;
if (stack.Count == 0)