Reputation: 861
I have pushed a new ModalPage
onto my current NavigationPage
using await Navigation.PushModalAsync(new ProfilePage());
I cannot figure out how to create a NavigationPage
inside the ModalPage
. I want to load another page, wrapping inside a NavigationPage
so that the loaded page has a navigation bar and back button to be able to return to the ModalPage
(ProfilePage).
I am trying to achieve:
NavigationPage > ModalPage > New NavigationPage
I have tried creating a new NavigationPage
inside the ModalPage
and pushing the new page onto the NavigationPage
but nothing happens. e.g.
var navigationPage = new NavigationPage(this);
navigationPage.PushAsync(new Page());
Can anyone help?
Upvotes: 5
Views: 3546
Reputation: 89102
var page = new NavigationPage(new MyPage());
Navigation.PushModalAsync(page);
Upvotes: 7