public interface IDesktopColorSchemeWindowHost : IDesktopWindowHost, IAsyncDisposable An optional native host that changes its window's light or dark appearance while it is open.
Remarks
Runic Desktop finds it by type and calls IDesktopColorSchemeWindowHost.SetColorSchemeAsync after DesktopWindow.SetColorSchemeAsync and DesktopHost.SetColorSchemeAsync. Report DesktopWindowCapabilities.ColorScheme in IDesktopWindowHost.Capabilities. The page's prefers-color-scheme should follow, as it does for DesktopWindowHostOptions.ColorScheme.
Methods
SetColorSchemeAsync
ValueTask SetColorSchemeAsync(DesktopColorScheme colorScheme, CancellationToken cancellationToken = default) Changes the window's appearance.
Parameters
colorSchemeThe scheme to show, already resolved: the window's own, else the application's (
DesktopHost.ColorScheme).DesktopColorScheme.NoPreferencefollows the system.cancellationTokenCancels the queued native work.
Returns
A task that completes when the window and its page show the scheme.