0
votes

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://docs.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)

1
Can you share some code of how you construct your master detail page ?Umar3x
@G.hakim Thanks, I think this will solve my issue.JasperMW
I am pretty sure it will!FreakyAli
@JasperMW In Detail Page also use Navigation.PushAsync can do it.Junior Jiang

1 Answers

2
votes

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

like this :

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