Win10 and Darkmode

why does Xojo return isDarkmode=false for Windows (yes I know that is what the docs say it will do)… but Why
Since supposedly Win10 has had a DarkMode for a few years already?

Because Xojo doesn’t support any of the multiple Windows dark mode options (trying more to say something about Microsoft not having a straight forward way to do dark mode than anything about supporting them).

Ok… not a WIndows guy as you know… so not sure what you mean by “Multiple”
what little documentation I’ve read makes it seem that the Win10 works like macOS (at least from the USER point of view)

[WinKey+I] to switch?

So the only way to “support DarkMode” is creating a user entered switch and internally switching all the colors via code?

There’s a few different ways to do dark mode with Windows. I don’t even know how it all plays together with the way Windows lets you theme the OS. It’s not a straightforward thing we’ve been told, and Microsoft announced a new way to do dark mode for UWP apps only shortly after Apple’s announcements. Xojo will not be able to support the UWP dark mode (a question that has come up a couple of times).

If you want to have an app level dark mode, sure. Supporting the OS level dark mode on Mac is done through drawing things in the Paint event using the proper colors which are given to us as only a few functions (like TextColor and FillColor). The rest of the coloring you’d have to determine with the IsDarkMode function during the Paint event.

There is currently no OS level dark mode support for Windows.

Yes, but… Xojo builds applications using Win32 Controls. And they don’t support “DarkMode” - you can’t even assign a Text/Background color for all Controls. So for own drawing that would work, but not for all standard controls.
As I understand the discussion about “DarkMode on Windows”, this only applies to “UWP applications”, not the Win32 API.

There have been different approaches to dark mode through themes in Windows since Windows XP. Each is somewhat different than the other.

The Win 10 incarnation is “for applications you can get from the Windows store” or simpler said, UWP applications. It is going to be very difficult to mimic the dark mode in a Xojo application, or any other win32 application.

edit: @Jürg Otter beat me to the finish. +1 on his comment.

So it sounds like… for now… don’t worry about DarkMode for Window unless and until Microsoft and Xojo meet at some point in the future and “isDarkMode” really does have a meaning for Win10 (Win15?)

No and not only this, but except Microsofts own Apps, no other of our Apps in our Company switch to Dark Mode once i activate it on my Windows 10 64bit Office Machine. But i have seen many Win Apps in the past which offered a “Themed Mode” and this has always been made on In-App level. :wink: