Table of Contents

Method AllowDarkModeForWindow

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

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

window nint

A handle to the window for which dark mode should be allowed or disallowed.

isDarkModeAllowed bool

Pass true to allow dark mode for the window; otherwise false.

Returns

bool

true if the operation succeeds; otherwise, false.