PicaPico.ThemeListener 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package PicaPico.ThemeListener --version 1.0.0                
NuGet\Install-Package PicaPico.ThemeListener -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="PicaPico.ThemeListener" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PicaPico.ThemeListener --version 1.0.0                
#r "nuget: PicaPico.ThemeListener, 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 PicaPico.ThemeListener as a Cake Addin
#addin nuget:?package=PicaPico.ThemeListener&version=1.0.0

// Install PicaPico.ThemeListener as a Cake Tool
#tool nuget:?package=PicaPico.ThemeListener&version=1.0.0                

ThemeListener NuGet Build AutoUpdate

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 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. 
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on PicaPico.ThemeListener:

Package Downloads
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

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 246 12/29/2023
1.0.0 215 7/22/2023

First release