Skip to content

sungaila/ImmersiveDarkMode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImmersiveDarkMode Logo Sungaila.ImmersiveDarkMode

GitHub Workflow Build Status SonarCloud Quality Gate NuGet version NuGet downloads GitHub license

Applies a dark theme to the titlebar of Win32 windows. Can also be toggled automatically whenever the system-wide application theme changes.

Works on Windows 11 (Build 22000) and newer.

Windows Forms

Add the following NuGet package: Sungaila.ImmersiveDarkMode.WinForms

Call WindowExtensions.SetTitlebarTheme() in the constructor of your System.Windows.Forms.Form and override WndProc like this:

public Form1()
{
    InitializeComponent();
    this.SetTitlebarTheme();
}

protected override void WndProc(ref Message m)
{
    base.WndProc(ref m);
    WindowExtensions.CheckAppsThemeChanged(m);
}

Windows UI Library 3

Add the following NuGet package: Sungaila.ImmersiveDarkMode.WinUI

Call WindowExtensions.InitTitlebarTheme() in the constructor of your Microsoft.UI.Xaml.Window like this:

public Window1()
{
    InitializeComponent();
    this.InitTitlebarTheme();
}

Windows Presentation Foundation

Add the following NuGet package: Sungaila.ImmersiveDarkMode.Wpf

Call WindowExtensions.InitTitlebarTheme() in the constructor of your System.Windows.Window like this:

public Window1()
{
    InitializeComponent();
    this.InitTitlebarTheme();
}

About

Applies a dark theme to the titlebar of Win32 windows.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages