https://github.com/sungaila/immersivedarkmode
Applies a dark theme to the titlebar of Win32 windows.
https://github.com/sungaila/immersivedarkmode
dark-mode dark-theme dwm win32 winui winui3 wpf
Last synced: 2 months ago
JSON representation
Applies a dark theme to the titlebar of Win32 windows.
- Host: GitHub
- URL: https://github.com/sungaila/immersivedarkmode
- Owner: sungaila
- License: mit
- Created: 2024-03-15T18:03:17.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-03-16T22:43:58.000Z (over 1 year ago)
- Last Synced: 2025-04-14T02:14:34.540Z (2 months ago)
- Topics: dark-mode, dark-theme, dwm, win32, winui, winui3, wpf
- Language: C#
- Homepage:
- Size: 167 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#  Sungaila.ImmersiveDarkMode
[](https://github.com/sungaila/ImmersiveDarkMode/actions/workflows/dotnet.yml)
[](https://sonarcloud.io/dashboard?id=sungaila_ImmersiveDarkMode)
[](https://www.nuget.org/packages/Sungaila.ImmersiveDarkMode/)
[](https://www.nuget.org/packages/Sungaila.ImmersiveDarkMode/)
[](https://github.com/sungaila/ImmersiveDarkMode/blob/master/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](https://www.nuget.org/packages/Sungaila.ImmersiveDarkMode.WinForms/)Call `WindowExtensions.SetTitlebarTheme()` in the constructor of your `System.Windows.Forms.Form` and override `WndProc` like this:
```csharp
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](https://www.nuget.org/packages/Sungaila.ImmersiveDarkMode.WinUI/)Call `WindowExtensions.InitTitlebarTheme()` in the constructor of your `Microsoft.UI.Xaml.Window` like this:
```csharp
public Window1()
{
InitializeComponent();
this.InitTitlebarTheme();
}
```## Windows Presentation Foundation
Add the following NuGet package: [Sungaila.ImmersiveDarkMode.Wpf](https://www.nuget.org/packages/Sungaila.ImmersiveDarkMode.Wpf/)Call `WindowExtensions.InitTitlebarTheme()` in the constructor of your `System.Windows.Window` like this:
```csharp
public Window1()
{
InitializeComponent();
this.InitTitlebarTheme();
}
```