Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 1 month 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 (9 months ago)
- Default Branch: master
- Last Pushed: 2024-03-16T22:43:58.000Z (9 months ago)
- Last Synced: 2024-11-21T00:59:37.006Z (about 1 month ago)
- Topics: dark-mode, dark-theme, dwm, win32, winui, winui3, wpf
- Language: C#
- Homepage:
- Size: 167 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ![ImmersiveDarkMode Logo](https://raw.githubusercontent.com/sungaila/ImmersiveDarkMode/master/etc/Icon_64.png) Sungaila.ImmersiveDarkMode
[![GitHub Workflow Build Status](https://img.shields.io/github/actions/workflow/status/sungaila/ImmersiveDarkMode/dotnet.yml?event=push&style=flat-square&logo=github&logoColor=white)](https://github.com/sungaila/ImmersiveDarkMode/actions/workflows/dotnet.yml)
[![SonarCloud Quality Gate](https://img.shields.io/sonar/quality_gate/sungaila_ImmersiveDarkMode?server=https%3A%2F%2Fsonarcloud.io&style=flat-square&logo=sonarcloud&logoColor=white)](https://sonarcloud.io/dashboard?id=sungaila_ImmersiveDarkMode)
[![NuGet version](https://img.shields.io/nuget/v/Sungaila.ImmersiveDarkMode.svg?style=flat-square&logo=nuget&logoColor=white)](https://www.nuget.org/packages/Sungaila.ImmersiveDarkMode/)
[![NuGet downloads](https://img.shields.io/nuget/dt/Sungaila.ImmersiveDarkMode.svg?style=flat-square&logo=nuget&logoColor=white)](https://www.nuget.org/packages/Sungaila.ImmersiveDarkMode/)
[![GitHub license](https://img.shields.io/github/license/sungaila/ImmersiveDarkMode?style=flat-square)](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();
}
```