Forum Xamarin.Forms

Using standard Icons for NavigationBar in Xamarin Forms

johanksonjohankson SEInsider, University ✭✭


Is there a way to use OS specific icons on a certain platform in Xamarin Forms?

For example, on iOS I would like to use UIBarButtonSystemItemAdd and on WP/droid a custom image.

    <ToolbarItem Name="Add" Command="{Binding ShowAddSheet}" Icon=" magic here " />


// Johan

Best Answer


  • johanksonjohankson SEInsider, University ✭✭

    Thanks Torben! I was afraid that I had to create a renderer. :)

  • MichaelRumplerMichaelRumpler ATMember ✭✭✭✭✭

    I also messed with the UIBarButtonItems. But what I saw is, when you define the ToolbarItems with an Icon like you did in your sample, then the resulting UIBarButtonItem will not have a Title set (or at least it was like that when I last debugged it). This means that you cannot use a default image on the other platforms and just replace it with the iOS icon on iOS.

  • johanksonjohankson SEInsider, University ✭✭

    Ok, I'll look into that! Thanks for the input!

  • AnthonyRamirezAnthonyRamirez USUniversity ✭✭✭
    edited September 2015


    I REALLY like the ability to use the platform specific icons using the code above.

    Thanks :)

  • lthibodeauxlthibodeaux USMember ✭✭

    @TorbenKruse Is this approach still functioning? I've recreated the array of UIBarButtonItem and assigned it to the RightBarButtonItems property successfully in my own code, but the original text-only buttons are still displayed.

  • VictorHGarciaVictorHGarcia USUniversity ✭✭

    The iOS render works very good. I'm wondering if you have a render for Android.

Sign In or Register to comment.