简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM