MasterDetailView "Hamburger" icon on iOS

Info-FrameLtdInfo-FrameLtd ✭✭HUMember ✭✭

I have a MasterDetailPage as MainPage in my project for Android and iOS, contained in a NavigationPage (as I want to change the full page content, including the App bar buttons, without an extra addition to my ViewModels). Setting the icon works perfectly on Android, however, on iOS, it refuses to show up. If there's no icon set, the text does appear, but it is ugly, in my opinion.

Is there any way to make the icon show up, without changing the Detail page of my MDP into a NavigationPage?

Posts

  • AlisonFernandesAlisonFernandes ✭✭ USMember ✭✭
    1. If you haven't already, set the MasterDetailPage.Master page Icon with the hamburguer menu image you want. It will need the file extension to work also in Windows Phone.
    2. Leave the MDP as your MainPage
    3. Set the NavigationPage as your MDP.Detail. Use this to navigate your app.

    I'll blog about this in the following weeks.

  • Info-FrameLtdInfo-FrameLtd ✭✭ HUMember ✭✭

    As I stated, THAT is not a solution for me. It will screw up the current navigation (which works perfectly on all three platforms, thank you), and also strip me from the possibilities of changing the actionbar/appbar buttons easily, by XAML.

  • AlisonFernandesAlisonFernandes ✭✭ USMember ✭✭
    edited May 2015

    My bad, misread the last sentence. Out of curiosity, how are you doing the actionbar/appbar handling? (Code example would be great).

  • Info-FrameLtdInfo-FrameLtd ✭✭ HUMember ✭✭

    Well it's pretty simple, every page has its own definition (or null, if not needed). MainPage is a NavigationPage, its content changes dynamically, controlled from the ViewModel (the main reason why I can't swap to the MDPage - Detail:NavigationPage pattern, it won't work on Android as I'm using a static property on App to provide a fixed "Navigation" base for the ViewModel).

    Hopefully we will get a more streamlined way of managing navigation (and icons on MDPages) in the following releases.

Sign In or Register to comment.