.NET MAUI › Advanced & Enterprise
How do you theme a MAUI app and support light/dark mode?
IntermediateAnswer
Define colors and styles in ResourceDictionaries (App.xaml), use AppThemeBinding to switch values by system theme, and read/set Application.Current.UserAppTheme to override. Centralize styles with implicit and explicit Style resources so theming is consistent and switchable at runtime.
<Label TextColor="{AppThemeBinding Light=Black, Dark=White}" />
Application.Current.UserAppTheme = AppTheme.Dark; // force darkReal-world example The app follows the OS dark mode automatically but also lets users force a theme from settings via UserAppTheme.