Xamarin Forms ToolBarItem icon tint color on Android

EJ 361 Reputation points
2021-06-24T06:58:49.323+00:00

Hi,

How can I change ToolBarItem icon tint colour on Android? On iOS it's white, but shows black on Android.
For example in below code:

<ContentPage.ToolbarItems>
<ToolbarItem IconImageSource="deleteitem.png"/>
<ToolbarItem IconImageSource="menu_vertical_black.png" />
</ContentPage.ToolbarItems>

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,916 questions
{count} votes

Accepted answer
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 43,776 Reputation points Microsoft Vendor
    2021-06-25T01:05:14.49+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    Do you want to achieve the white three dots at the end of toolbar like following screenshot?

    109146-image.png

    You just add the Order="Secondary" for your <ToolbarItem Order="Secondary"/>

    If you do not want to add Order="Secondary", you add a white three dots image directly.

    I upload my white white three dots icon here .

    ↓↓↓↓↓↓(right click-save image here)↓↓↓↓↓

    109165-icons8-dots-loading-48.png

    (48 px)

    109182-icons8-dots-loading-96.png

    (96px)

    Best Regards,

    Leon Lu


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

2 additional answers

Sort by: Most helpful
  1. EJ 361 Reputation points
    2021-06-25T01:23:57.953+00:00

    Thank you Leon! Order="Secondary" did the trick!

    But in general, if I want to add different icon to toolbar, I need to make it's colour white in image file, there is no way to tint it like you can do with Xamarin toolkit and Image or ImageButton?

  2. Luiz Eduardo Goebel 0 Reputation points
    2023-01-11T11:09:24.1533333+00:00

    Hey guys,

    I want know how can i tint the 3 dots of toolbar itens, someone can help me with that?