0
votes

I need to do a master detail layout page in Xamarin which then will be used in child pages.

Please check the screenshot below:

enter image description here

I need to have a header part with button for notifications and a button for context menu plus a header.

What is the best approach how I can create this layout in Xamarin?

2
So what you want is all your pages should have the Master-Detail setup?FreakyAli

2 Answers

0
votes

I will assume that you want to use Xamarin.Forms, instead of using Xamarin.Android and Xamarin.iOS separately.

One approach would be to use default MasterDetailPage as described here or even better to try it with Shell as described here. Then, you would need to create your CustomNavigationPage and write a custom renderer for it.

Second approach would be to do some tricks, again creating your CustomNavigationPage with template(so that the navigation bar is always displayed) and that you change content dynamically. Also, you would need to hide default navigation bar and attach click events to your menu button to really open up the menu. Hope you got it clearly.

0
votes

MasterDetailPage already provides nearly all functionality that you have asked for, so in some way your question isn't quite clear as you already mention MasterDetailPage. The only remaining problem I can see is how to set up a custom header, and that is than with NavigationPage.TitleView.