Forum Xamarin Xamarin.Forms

How show master page (slide menu) in MasterDetailPage from right to left?

SirAndriySirAndriy USMember ✭✭✭
edited May 2016 in Xamarin.Forms

Hi xam devs, I have one project and need to implement Arabic language support, all is ok, except one, slide menu toolbar button is correct in the right of page but main page (menu page) always shows as left-to-right. This situation is only in iOS on Android all works perfect.

Can anybody help me? How show menu in masterdetailpage as right-to-left?

closed menu -
opened menu -

p.s. system language is set to Arabic and in plist I set to support to languages - en,ar

Best Answers


  • JaekyuOhJaekyuOh USMember

    Would you mind if you tell which extra resources you had to use? :)

  • SirAndriySirAndriy USMember ✭✭✭

    Hi @JaekyuOh, no extra resources I only create renderer on MasterDetailRenderer based on PhoneMasterDetailRenderer and overrided ViewDidLoad().
    I create own UpdatePanGesture which are used in ViewDidLoad - you must look to source of PhoneMasterDetailRenderer.ViewDidLoad all action with slide are in UpdatePanGesture and LayoutChildren methods

  • JaekyuOhJaekyuOh USMember

    @SirAndriy Thank you very much !! I will try to follow your steps :)

  • JaekyuOhJaekyuOh USMember

    Hi @SirAndriy, how did you approach this problem for android platform? :)

  • SirAndriySirAndriy USMember ✭✭✭

    In android I did nothing... when you switch device language to Arabic (or other right-to-left) slide menu shows correct from right side. Problem was only ib iOS

  • @SirAndriy said:
    I solved this problem with PhoneMasterDetailRenderer + Xamarin open source resources

    can i have more details what exactly need to change in UpdatePanGesture or in _panGesture

  • SirAndriySirAndriy USMember ✭✭✭
    edited June 2017 Accepted Answer

    Here is example

    p.s. don't be shy and give like to this solution :)

  • FranzBFranzB AUMember ✭✭

    Thanks @SirAndriy, your solution got me started!

    However, I detected a couple of issues with your version of the MasterDetailRenderer for iPhone. Firstly, the layout is not correct for landscape orientation. Secondly, tapping on the master part while slided into the screen will slide the master out again, instead of the master processing the event itself as it should.

    Looking closer, it seems that the problem lies in the fact that you inherit from the existing PhoneMasterDetailRenderer instead of completely replacing it with your own version of the renderer. Hence you are doubling up private members of the class.

    At I created an alternative version which replaces Xamarin's PhoneMasterDetailRenderer. Not ideal but working for now until Xamarin fix their right-to-left support for the PhoneMasterDetailRenderer.

  • SirAndriySirAndriy USMember ✭✭✭

    Cool, thx.
    p.s. BTW, I not tested it on landscape because my project was only portrait mode :(

Sign In or Register to comment.