To disable dark mode support in .NET MAUI, you need to use these code snippets in each platform
Android
In the MainApplication add the following line:
public MainApplication(IntPtr handle, JniHandleOwnership ownership) : base(handle, ownership)
{
AppCompatDelegate.DefaultNightMode = AppCompatDelegate.ModeNightNo;
}
iOS
In the info.plist file, add the following keyvaluepair:
<key>UIUserInterfaceStyle</key>
<string>Light</string>
WinUI
In the App.xaml.cs (the windows version one) add the following line:
public App()
{
this.InitializeComponent();
RequestedTheme = ApplicationTheme.Light;
}