JasperMW
JasperMW

Reputation: 533

Navigation Page inside of a Master Detail Page

I am trying to create a Master Detail page with inner Navigation. So if you go to DetailPage 1, for example, you will see a list of size n. Ideally, when you press a list item, you get taken to a new page. However, on this new page, I have no way to go back to the Master Detail Page. Pressing the Back button on my Android phone minimizes the app, and the Master Detail view is gone.

I searched around a while, but couldn't find any posts resolving this specific issue. I've tried creating a new DetailPage, and having the user navigated there. That worked, but it looks ugly and user unfriendly.

My code follows this Microsoft tutorial: https://learn.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/navigation/master-detail-page

If needed, I can post some examples but I don't think that would be necessary.

Expected result, navigation shown from top to bottom:

Master-Detail Page Detail (NavigationPage) NavigationPage.PushAsync(newPage)

Upvotes: 0

Views: 390

Answers (1)

Hashir Malik
Hashir Malik

Reputation: 808

just wrap your detailpage in navigation page and add a toolbaritem and your problem is solved!

like this :

var detailpage = new NavigationPage(new YourDetailPageName());

Upvotes: 2

Related Questions