Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What decides the color of the tab bar in a Xamarin.Forms tabbed page?

I would like to use the same color for the background of an area at the top of one of my screens.

Does anyone know how is this color decided. Is that something Xamarin preset or is it an iOS and Android present color?

like image 883
Samantha J T Star Avatar asked Aug 14 '17 20:08

Samantha J T Star


1 Answers

They are defaults in each platform. Android via it's theme and iOS by default properties.

However if you want to change it, you can do this in your Xamarin.Forms project.

var tabbedPage = new TabbedPage()
            {
                BarBackgroundColor = Color.Black,
                BarTextColor = Color.White
            };

Or set those properties in XAML.

like image 58
Adam Avatar answered Sep 25 '22 19:09

Adam