Sungaila.ImmersiveDarkMode.WinForms 1.0.0

Prefix Reserved
dotnet add package Sungaila.ImmersiveDarkMode.WinForms --version 1.0.0                
NuGet\Install-Package Sungaila.ImmersiveDarkMode.WinForms -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Sungaila.ImmersiveDarkMode.WinForms" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Sungaila.ImmersiveDarkMode.WinForms --version 1.0.0                
#r "nuget: Sungaila.ImmersiveDarkMode.WinForms, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Sungaila.ImmersiveDarkMode.WinForms as a Cake Addin
#addin nuget:?package=Sungaila.ImmersiveDarkMode.WinForms&version=1.0.0

// Install Sungaila.ImmersiveDarkMode.WinForms as a Cake Tool
#tool nuget:?package=Sungaila.ImmersiveDarkMode.WinForms&version=1.0.0                

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.

Getting started

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);
}
Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net7.0-windows7.0 is compatible.  net8.0-windows was computed.  net8.0-windows7.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 170 3/16/2024
1.0.0-preview 102 3/16/2024

- Initial release.