Reputation: 15955
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.
Upvotes: 4
Views: 1900
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);
Upvotes: 4