Now that iOS 13 and Android Q allow the user to enable Dark Mode at the operating system level, how can I check for it in Xamarin.Forms?
I\'ve created this in my Xam
It is no longer necessary to use platform-specific services to check for light/dark mode in Xamarin.Forms.
We can now get the current theme directly via:
OSAppTheme currentTheme = Application.Current.RequestedTheme;
where the RequestedTheme property returns an OSAppTheme enumeration member: Unspecified, Dark, or Light.
For more info: see documentation and the updated Xamarin.Forms Application.cs code.