Reputation: 21
I need to add a back button to my navigation page. I tried NavigationPage.SetHasBackButton(page, true);
but it didn't work and I tried in xaml also, still does not work. Can anybody help me?
Upvotes: 2
Views: 2739
Reputation: 309
Your code isn't right. In App.xaml.cs you need to set Main page to be new NavigationPage(new ProductDetail());
Then when you navigate away from ProductDetail, you will see the back button.
Also normal page navigation will use PushAsync. Are you wanting a modal popup for your second page?
Upvotes: 1