Forum Xamarin.Forms

StatuaBar color without navigationbar

jb_tcjb_tc USMember ✭✭


I want to change to status bar color (The bar, where the clock and battery status is located).

This is my Code, where the different tabs are defined.

var homeNavigation = new NavigationPage(new Home());
homeNavigation.SetValue(NavigationPage.BarBackgroundColorProperty, Color.Black);
homeNavigation.BarBackgroundColor = Color.Black;
homeNavigation.BackgroundColor = Color.Black;

homeNavigation.Title = "Home";

For reasons, I disabled the NavigationBar NavigationPage.SetHasNavigationBar(this, false);.

Is it possible to change to status bar color without the navigation bar? And how?

If I enabled the status bar it worked successfully.

Thanks for your help!

Best Answer


Sign In or Register to comment.