1

I want to create Sidebar menu as shown in image ,I have looked into all the examples of Master detail pages over internet and came to know ,the look depends on platform . Though i need to have identical look on both android and iOS . the default behaviour of iOS is what i want in android as well, where upon clicking on menu button , whole menu view slides upon and menu button appears in the right margin at top also showing a part of detail view . could anyone help me out with examples or approach ! Thanks in advance ! Please refer to picture .enter image description here

Saket Kumar
  • 1,157
  • 2
  • 14
  • 30
  • 1
    Thanks for your reply ! Johannes ! , all i asked is for approach , and some examples that could help me ! in case u think i have done some sin asking it. i would show u millions such question with same demands . – Saket Kumar Feb 25 '16 at 09:23
  • Did you find a solution for this drawer ? – Ahlem Jarrar Feb 06 '17 at 12:59
  • I don't exactly remember its being an year now ,though i can recollect one thing is with default implementation it was not possible . custom renderer was the way ,which i didn't dive into i think – Saket Kumar Feb 06 '17 at 22:01
  • Hey, I too am stuck on this now, and I’ve tried and tried with no luck. Could you maybe post the code you used to get it right? – Daniel Jan 23 '18 at 22:58

2 Answers2

1

If I'm understanding your question correctly and you want your Android MasterDetailPage to behave more like iOS, you will to have to use a custom renderer. An application built off of Forms is going to run with the behavior of the particular platform, and custom renderers exist as a means to modify those controls on a per-platform basis. Look to the guide posted above for a way to get started.

Paul
  • 1,175
  • 8
  • 15
1

You need to write custom 'slider' and show it instead of the drawer. Like that http://www.michaelridland.com/xamarin/announcing-slideoverkit-for-xamarin-forms/

You need to do that, because unfortunately, it's quite not possible to do it with Xamarin.Forms. This behavior is hidden in Platform class that is internal. I thought about rewrite it, but I estimated that it actually require rewriting about half of platform code. And I give up here.

About how to start: you need to write\find code for android which provides required behavior (e.g. Android Navigation Drawer on top ActionBar). After that, you need to dive deep in Xamarin.Forms.Platform.Android (Platform and MasterDetailRenderer classes).

If you'll be successful, please share your solution with me

Community
  • 1
  • 1
Eugene
  • 1,699
  • 1
  • 12
  • 13
  • what i actually ended up doing is , I used one relative layout ,put one hamburgerbutton , on button click event , i push another contentView from left side ! i just miss the animation , once completed will post the code – Saket Kumar Feb 25 '16 at 19:54