PicaPico.ThemeListener
1.0.1
dotnet add package PicaPico.ThemeListener --version 1.0.1
NuGet\Install-Package PicaPico.ThemeListener -Version 1.0.1
<PackageReference Include="PicaPico.ThemeListener" Version="1.0.1" />
<PackageVersion Include="PicaPico.ThemeListener" Version="1.0.1" />
<PackageReference Include="PicaPico.ThemeListener" />
paket add PicaPico.ThemeListener --version 1.0.1
#r "nuget: PicaPico.ThemeListener, 1.0.1"
#:package PicaPico.ThemeListener@1.0.1
#addin nuget:?package=PicaPico.ThemeListener&version=1.0.1
#tool nuget:?package=PicaPico.ThemeListener&version=1.0.1
ThemeListener

ThemeListener is a library for monitoring changes in the dark or light mode of Windows system.
Usage
ThemeListener is available as NuGet package.
using PicaPico;
PicaPico.ThemeListener.ThemeChanged += OnThemeChanged;
static void OnThemeChanged(bool isDark)
{
Console.WriteLine($"System theme is change, current theme is {(isDark ? "Dark" : "Light")}");
}
Console.WriteLine($"System theme is {(ThemeListener.ThemeListener.IsDarkMode ? "Dark" : "Light")}");
Repository
The source code for ThemeListener is hosted on GitHub. You can find it at the following URL: https://github.com/HeHang0/ThemeListener
License
ThemeListener is released under the MIT license. This means you are free to use and modify it, as long as you comply with the terms of the license.
| Product | Versions 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. net9.0-windows was computed. net10.0-windows was computed. |
| .NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 is compatible. net481 was computed. |
-
.NETFramework 4.6.2
- Microsoft.Win32.SystemEvents (>= 7.0.0)
-
.NETFramework 4.7.2
- Microsoft.Win32.SystemEvents (>= 7.0.0)
-
.NETFramework 4.8
- Microsoft.Win32.SystemEvents (>= 7.0.0)
-
net6.0-windows7.0
- Microsoft.Win32.SystemEvents (>= 7.0.0)
-
net7.0-windows7.0
- Microsoft.Win32.SystemEvents (>= 7.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on PicaPico.ThemeListener:
| Package | Downloads |
|---|---|
|
PicaPico.AcrylicHelper
An easy-to-use library for apply acrylic window. |
|
|
PicaPico.NotifyIcon
An an easy-to-use library for displaying NotifyIcon (notification icon) in both WPF and WinForms applications, offering non-intrusive system notifications and quick access functionality in the taskbar. |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on PicaPico.ThemeListener:
| Repository | Stars |
|---|---|
|
HeHang0/PunchPal
An efficient work hour management tool | 高效的工时管理工具
|
First release