Method AllowDarkModeForWindow
AllowDarkModeForWindow(nint, bool)
Enables or disables dark mode for a specific window using an undocumented uxtheme entry.
public static extern bool AllowDarkModeForWindow(nint window, bool isDarkModeAllowed)
Parameters
windownintA handle to the window for which dark mode should be allowed or disallowed.
isDarkModeAllowedboolPass true to allow dark mode for the window; otherwise false.