Change color of ToolBarItem in XAML

user4857063 picture user4857063 · Jul 26, 2017 · Viewed 11.9k times · Source

I've added a toolbaritem in my app, however i dont see a way to change its background and text color.

<ContentPage.ToolbarItems>

    <ToolbarItem Text="About" 
                 Icon="ic_action_more_vert.png"
                 Priority="0"
                 Order="Secondary"
                 Clicked="ToolbarItem_Clicked"/>

    <ToolbarItem Text="Settings"
                 Icon="ic_action_more_vert.png"
                 Priority="0"
                 Order="Secondary"/>

</ContentPage.ToolbarItems>

This is what I'd like changed. The black menu with white text, want to change that bg color and text color. Any idea how to achieve this?

enter image description here

Answer

Guillermo Daniel Arias picture Guillermo Daniel Arias · May 18, 2018

I found a solution :https://forums.xamarin.com/discussion/40529/toolbaritem-textcolor

Simple add to "styles.xml":

<item name="android:actionMenuTextColor"> @color/orange </item>

I've spent hours looking for it..