6
votes

I have started building an app on Xamarin Studio using Prism with Xamarin.Forms. My issue is that I can't seem to find a snippet of code as an example of MasterDetail navigation inside the app.

Every time I navigate to a page it just renders a new view on top of the previous master view. Is there an example somewhere, or instructions on how to use switchable views in order to achieve master/detail navigation with prism on xamarin? I have found some prism examples for windows forms applications but nothing specific to xamarin forms.

Thank you in advance and sorry for the generalized question.

1

1 Answers

18
votes

Check out the sandbox sample that is in the Prism repo.. It's actually quite simple.

https://github.com/PrismLibrary/Prism/tree/master/Sandbox/Xamarin/HelloWorld

You just have to call navigate from your MasterDetilPage ViewModel. This will set the Detail page accordingly.