2

How do I change the background color and text of ToolbarItems? The default color is black and I would like to change how to do it?

Click here to see the example image

<ContentPage.ToolbarItems>
    <ToolbarItem Order="Secondary" Icon="morevert.png" Text="Atualizar" Command="{Binding Atualizar}"/>
    <ToolbarItem Order="Secondary" Text="Ajuda" Command="{Binding Ajuda}"/>
    <ToolbarItem Order="Secondary" Text="Sair" Command="{Binding Sair}"/>
</ContentPage.ToolbarItems>
Hugo Cruz
  • 33
  • 1
  • 6
  • Start in [their help forums](https://forums.xamarin.com/discussion/22017/how-to-change-navigation-bar-color) – Chris W. Jun 30 '17 at 17:08
  • If the toolbaritem color; I guest that it can help you... https://stackoverflow.com/a/28979152/10868460 – jAVI sUA Mar 28 '19 at 18:01

1 Answers1

1

Try it in your NavigationPage:

        BarBackgroundColor = Color.Black;
        BarTextColor = Color.White;

EDITED

I am sorry. You can apply a style to your Android app within the android project. For an easy way to generate your style take a look at the Android Style Generator. You must create a style and use it in your app. How use - read this article.

FetFrumos
  • 5,388
  • 8
  • 60
  • 98
  • That did not help me! It is changing the color of the ContentPage.ToolbarItems and this is not what I want, that just change the color of the items, as it is in the image: https://i.stack.imgur.com/kLBHS.png – Hugo Cruz Jun 30 '17 at 18:34
  • Click on this link that will display what I want: http://i.stack.imgur.com/kLBHS.png I want to change the black background color and the text also and put another – Hugo Cruz Jun 30 '17 at 23:30