MAUI — Which one do you prefer, Light or Dark Mode?
"weeping may be for a night, but joy comes in the morning." psalms 30:6
Hey, Here I am again!
For this post, I brought only good things for us!
So, maybe you noticed that the default project in MAUI changes the theme automatically.
When you are using Dark Theme on your system, you should see something like this:
Or, if you are using Light Theme, something like this should appear.
But how did it happen?
Who is responsible for this magic is our new friend AppThemeBinding.
Hey, but I don't see it on my Main Page.(MainPage.xaml)
So then, this is another wonderful novelty about MAUI. We have some styles pre-configured for some UI's, and one of them is being applied for property BackgroundColor with conditions based on the theme using AppThemeBinding for all Pages in our application.
AppThemeBinding is a powerful tool to make modern applications focused on user experience, and having some styles pre-configured can accelerate development when you need to start from scratch.
I hope to keep bringing more insights about my experience with MAUI soo.
Feel free to give me feedback and suggestions for new posts.