[mac] disregard the Dark mode (#5537) fixes #3777
authorPavel Yakovlev <v-payako@microsoft.com>
Mon, 18 Mar 2019 14:48:21 +0000 (17:48 +0300)
committerRui Marinho <me@ruimarinho.net>
Mon, 18 Mar 2019 14:48:21 +0000 (14:48 +0000)
Xamarin.Forms.Platform.iOS/Forms.cs

index 47b925d..5530f7a 100644 (file)
@@ -97,6 +97,9 @@ namespace Xamarin.Forms
 #else
                        Device.SetIdiom(TargetIdiom.Desktop);
                        Device.SetFlowDirection(NSApplication.SharedApplication.UserInterfaceLayoutDirection.ToFlowDirection());
+                       var mojave = new NSOperatingSystemVersion(10, 14, 0);
+                       if (NSProcessInfo.ProcessInfo.IsOperatingSystemAtLeastVersion(mojave))
+                               NSApplication.SharedApplication.Appearance = NSAppearance.GetAppearance(NSAppearance.NameAqua);
 #endif
                        Device.SetFlags(s_flags);
                        Device.PlatformServices = new IOSPlatformServices();