Microsoft.Win32.SystemEvents
10.0.0-preview.5.25266.103
Prefix Reserved
See the version list below for details.
dotnet add package Microsoft.Win32.SystemEvents --version 10.0.0-preview.5.25266.103
NuGet\Install-Package Microsoft.Win32.SystemEvents -Version 10.0.0-preview.5.25266.103
<PackageReference Include="Microsoft.Win32.SystemEvents" Version="10.0.0-preview.5.25266.103" />
<PackageVersion Include="Microsoft.Win32.SystemEvents" Version="10.0.0-preview.5.25266.103" />
<PackageReference Include="Microsoft.Win32.SystemEvents" />
paket add Microsoft.Win32.SystemEvents --version 10.0.0-preview.5.25266.103
#r "nuget: Microsoft.Win32.SystemEvents, 10.0.0-preview.5.25266.103"
#:package Microsoft.Win32.SystemEvents@10.0.0-preview.5.25266.103
#addin nuget:?package=Microsoft.Win32.SystemEvents&version=10.0.0-preview.5.25266.103&prerelease
#tool nuget:?package=Microsoft.Win32.SystemEvents&version=10.0.0-preview.5.25266.103&prerelease
About
Provides support for accessing Windows system event notifications, which can be crucial for applications to respond to changes in the system or user environment.
Through this assembly, applications can subscribe to a set of global system events provided by the SystemEvents
class, gaining the ability to react to changes like system power mode alterations, user preference modifications, and session switches, among others.
Key Features
- Access to a set of global system events
- Notification of changes in user preferences
- Notification of system power mode changes
- Notification of session switches
How to Use
An example of how to use the SystemEvents
class to react to system changes:
using Microsoft.Win32;
// Set the SystemEvents class to receive event notification when a user
// preference changes, the palette changes, or when display settings change.
SystemEvents.UserPreferenceChanging += UserPreferenceChanging;
SystemEvents.PaletteChanged += PaletteChanged;
SystemEvents.DisplaySettingsChanged += DisplaySettingsChanged;
// For demonstration purposes, this application sits idle waiting for events.
Console.WriteLine("This application is waiting for system events.");
Console.WriteLine("Press <Enter> to terminate this application.");
Console.ReadLine();
// This method is called when a user preference changes.
static void UserPreferenceChanging(object sender, UserPreferenceChangingEventArgs e)
{
Console.WriteLine($"The user preference is changing. Category={e.Category}");
}
// This method is called when the palette changes.
static void PaletteChanged(object sender, EventArgs e)
{
Console.WriteLine("The palette changed.");
}
// This method is called when the display settings change.
static void DisplaySettingsChanged(object sender, EventArgs e)
{
Console.WriteLine("The display settings changed.");
}
In this example, the methods will be invoked whenever the user modifies one of several system settings.
Main Types
The main types provided by this library are:
Microsoft.Win32.SystemEvents
Microsoft.Win32.PowerModeChangedEventHandler
Microsoft.Win32.SessionEndedEventHandler
Microsoft.Win32.UserPreferenceChangedEventHandler
Additional Documentation
Feedback & Contributing
Microsoft.Win32.SystemEvents is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
GitHub repositories (16)
Showing the top 16 popular GitHub repositories that depend on Microsoft.Win32.SystemEvents:
Repository | Stars |
---|---|
microsoft/PowerToys
Windows system utilities to maximize productivity
|
|
BeyondDimension/SteamTools
🛠「Watt Toolkit」是一个开源跨平台的多功能 Steam 工具箱。
|
|
duplicati/duplicati
Store securely encrypted backups in the cloud!
|
|
unoplatform/uno
Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
|
|
BartoszCichecki/LenovoLegionToolkit
Lightweight Lenovo Vantage and Hotkeys replacement for Lenovo Legion laptops.
|
|
mgth/LittleBigMouse
DPI Aware mouse move across screens
|
|
dotnet/winforms
Windows Forms is a .NET UI framework for building Windows desktop applications.
|
|
Topshelf/Topshelf
An easy service hosting framework for building Windows services using .NET
|
|
WalletWasabi/WalletWasabi
Open-source, non-custodial, privacy preserving Bitcoin wallet for Windows, Linux, and Mac.
|
|
WPFDevelopersOrg/WPFDevelopers
🎉 Welcome to follow the "WPFDevelopers" public account! This is a sample project we share daily, covering WPF's basic controls and custom control libraries. The project will be continuously updated, welcome to give us ⭐️
|
|
Artemis-RGB/Artemis
Provides advanced unified lighting across many different brands RGB peripherals
|
|
pdfforge/PDFCreator
PDFCreator - The free PDF Converter
|
|
dalyIsaac/Whim
Pluggable dynamic window manager for Windows🏗️🪟
|
|
creewick/uWidgets
Standalone .NET application with a variety of customizable widgets
|
|
EvanMulawski/FanControl.CorsairLink
The unofficial CorsairLink plugin for Fan Control. Adds support for Corsair controllers, liquid coolers, and power supplies. An alternative to iCUE.
|
|
ArakawaHenri/EnergyStarX
Throttle background programs automatically.
|
Version | Downloads | Last Updated |
---|---|---|
10.0.0-preview.6.25321.102 | 0 | 6/25/2025 |
10.0.0-preview.5.25280.105 | 0 | 6/2/2025 |
10.0.0-preview.5.25277.114 | 0 | 6/3/2025 |
10.0.0-preview.5.25277.101 | 0 | 5/29/2025 |
10.0.0-preview.5.25266.103 | 0 | 5/20/2025 |
10.0.0-preview.4.25255.103 | 0 | 5/12/2025 |
9.0.7 | 0 | 7/11/2025 |
4.6.0-preview.19073.11 | 2 | 1/28/2019 |
4.6.0-preview.18571.3 | 2 | 11/30/2018 |