Hi,
I am opening a ModalPage called MyPage22 from a page called MyPage11 this way:
await App.Current.MainPage.Navigation.PushModalAsync(new Xamarin.Forms.NavigationPage(new PlaceDetails(place_id)));
How can I remove MyPage11 before opening the MyPage22?
I tried:
async void Button_Clicked(System.Object sender, System.EventArgs e)
{
Navigation.RemovePage(this);
await App.Current.MainPage.Navigation.PushModalAsync(new Xamarin.Forms.NavigationPage(new MyPage22()));
}
but getting:
System.InvalidOperationException: Cannot remove root page when it is also the currently displayed page.