Steve Peschka
Steve Peschka

Reputation: 1371

Where Do You Set the Top OS Bar Backcolor

I'm trying to figure out where you set the backcolor that's used on the top OS info bar on devices in a MAUI app. Here's a picture of the section I mean, with a red circle around the part I want to change:

enter image description here

Upvotes: 2

Views: 930

Answers (1)

Gerald Versluis
Gerald Versluis

Reputation: 34118

This is something that still needs a platform-specific approach at this time. Go into the Platforms\Android\Resources\values folder and find the colors.xml file.

Screenshot of the Visual Studio Solution Explorer showing the colors.xml file

Inside of that file, for a default template, you should find three values: colorPrimary, colorPrimaryDark and colorAccent.

colorPrimaryDark is the one that influences the color of your statusbar.

We have an Effect to do this in the Xamarin Community Toolkit. Unfortunately it seems that has not been ported to the .NET MAUI Community Toolkit at the time of writing.

Upvotes: 2

Related Questions