oshirowanen
oshirowanen

Reputation: 15955

Change text/icon color in top bar

How do I change the color of the text and icon's in the very top bar. I want to change the backgroundcolor of that bar to a light color, which I know how to do, I can't figure out how to make the text/icon's darker.

enter image description here

Upvotes: 4

Views: 1900

Answers (1)

Cfun
Cfun

Reputation: 9721

You can use StatusBarBehavior from MAUI toolkit package, as a Behavior at a ContentPage level:

<ContentPage.Behaviors>
    <toolkit:StatusBarBehavior StatusBarColor="LightGreen" StatusBarStyle="DarkContent" />
</ContentPage.Behaviors>

or by calling the provided methods:

CommunityToolkit.Maui.Core.Platform.StatusBar.SetColor(Colors.LightGreen);
CommunityToolkit.Maui.Core.Platform.StatusBar.SetStyle(StatusBarStyle.DarkContent);

StatusBarBehavior docs

Upvotes: 4

Related Questions