Skip to content

Welcome to the Dark Side of Windows

Starting with Xojo 2021r3, the Windows IDE is now themed for dark mode. This is because we’ve added support for dark mode aware Windows apps. But wait, how is that even possible with Win32 controls? Well…

Windows IDE in dark mode

While not perfect, Microsoft has always provided enough capabilities (for the most part) to get Win32 controls themed for dark mode. Some Win32 controls they even themed correctly from the beginning when Microsoft first introduced dark mode on Windows. However, there are a few controls that are not supported in dark mode, such as TabPanels, autocompleting ComboBoxes, and DateTimePicker.

To opt into dark mode, just enable it in the shared build settings (by default this is enabled).

Not ready for dark mode? Simply disable that option and your app will continue to operate in light mode as before. When you are ready for dark mode, make any necessary image adjustments and make sure to use the appropriately themed colors (for example Color.TextColor) in places that need it. For dark mode customization use the Color.IsDarkMode to check if the OS is in dark mode. To theme colors differently between light and dark mode, add a ColorGroup and assign them to the controls that need them. Once you’re done with your tweaks, enjoy the dark side of Windows!

Eddies Electronics running in dark mode with one line code tweak for Color.TextColor and some toolbar image updates.

For additional capabilities, you can disable dark mode theming (even when you have the dark mode support enabled) in your app by setting up the XOJO_WIN32_DARKMODE_DISABLED environment variable (either set to “true” or “1”) in your App.Opening event.

Learn more in the Xojo Documentation.