2

I've created a simple Xamarin.Forms application with Prism to experiment with the navigation. I have taken the example application an changed it slightly.

When the application loads and the user logs in the application goes to the Master Detail page through NavigationService.NavigateAsync("/Index/Navigation/Process"). On this page there is a button that does NavigationService.NavigateAsync("SecondProcess"). At this point the back button appears as expected but when it is pressed the app goes to the Process page and the hamburger menu is lost.

Am I using the navigation process incorrectly?

Edit: I've uploaded the project to GitHub. https://github.com/JonathanTurnerTBA/PrismExample.git

JTee
  • 21
  • 3
  • It appears this question has already been answered, here: https://stackoverflow.com/questions/41216358/hamburger-menu-prism-xamarin-forms – Zac Dec 06 '17 at 15:13
  • Possible duplicate of [hamburger menu prism xamarin forms?](https://stackoverflow.com/questions/41216358/hamburger-menu-prism-xamarin-forms) – Scath Dec 06 '17 at 15:17
  • I looked at the linked item and couldn't resolve my issue. I've added a GitHub repo to the original question. – JTee Dec 06 '17 at 17:17

1 Answers1

0

At this point the back button appears as expected but when it is pressed the app goes to the Process page and the hamburger menu is lost.

The problem is you passed the Navigation Path is incomplete. For your design requirement, the MasterDetailPage is the root navigation, if you want to display the hamburg menu in the per page, you need to modify the navigation path like the following:

"/Index/Navigation/ProcessList/FirstProcess" 

When you press back button, the NavigationService will found the previous page /Index/Navigation/ProcessList, and attach hamburg menu automatically.

Nico Zhu
  • 32,367
  • 2
  • 15
  • 36