I would like to implement light and dark theme inside of my Maui Blazor application. As you know, Blazor is nothing other than Html and Css so I easily implement dark and light theme for the content of my app (thanks to a simple .dark class added on the html tag).
The problem I am facing is for the upper and lower part of the Maui application.
Let me show you by an example.
Android version
iOS version
The pictures above show you the current situation: on the left, the light theme and on the right, the dark theme. As you can see, the dark theme is problematic for the top and bottom sections (only the top section is problematic for the iOS version).
What I would like to achieve: the top and bottom sections should be colored the same as the content of the page:
- #292929 for the Dark theme
- #FFFFFF for the Light theme
Something like the picture below: when switching to the dark theme, everything is coloured.
I have no idea how to achieve this for Maui Blazor and I have no experience with Xamarin.
Can you point me to the right direction please ?
As you probably know, BlazorWebView enables you to host a Blazor web application right in the .NET MAUI application.