3

I'm using Xamarin's ToolbarItems class with XAML:

<ContentPage.ToolbarItems>
    <ToolbarItem Text="Sent Messages" Clicked="ToolbarItem_OnClicked" 
    Order="Primary" Priority="0" />
</ContentPage.ToolbarItems>

Is there a way to change the background color and text color of all the toolbaritems?

paulina
  • 199
  • 3
  • 14

1 Answers1

3

When creating a navigation page you can change the background color, and text color of the ToolbarItems as follows.

new NavigationPage (new MyPage ()) {
    BarBackgroundColor = Color.Green, BarTextColor = Color.White   
};

Hope this helps.

Mykola
  • 3,343
  • 6
  • 23
  • 39
John
  • 31
  • 2