@Cole Xia (Shanghai Wicresoft Co,.Ltd.)
My apologies for the long delay.
I've taken your suggestion and created a blank Xamarin.Forms app from a VS template, and added the same method call. This one behaves the same exact way.
To be more specific, the exact call I'm doing is this (trying to opt out of dark mode):
if (UIDevice.CurrentDevice.CheckSystemVersion(13, 0))
{
Window.OverrideUserInterfaceStyle = UIUserInterfaceStyle.Light;
}
where Window
is of type UIWindow
When I go into the metadata for the UIView
(child class of UIWindow
) in UIKit
, I see the following definition:
[BindingImpl(BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
[Introduced(PlatformName.TvOS, 13, 0, PlatformArchitecture.All, null)]
[Introduced(PlatformName.iOS, 13, 0, PlatformArchitecture.All, null)]
[Unavailable(PlatformName.WatchOS, PlatformArchitecture.All, null)]
public virtual UIUserInterfaceStyle OverrideUserInterfaceStyle { get; set; }