How can I detect Windows 10 light/dark mode?
问题 I'm using Windows.UI.ViewManagement.UISettings to get system accent color but it seems this class does not have any method or property for light/dark mode. I failed to find a document for this feature, how can I detect this? PS: I'm making a JS app which does not have access for Windows.UI.Xaml namespace. 回答1: I have found an easier solution, which should work in JavaScript apps as well, without requiring the Windows Runtime Component - the UISettings class: var uiSettings = new Windows.UI