System.Windows.Extensions 9.0.0
About
Provides miscellaneous Windows-specific types.
This collection of types facilitates interactions with unique features provided by the Windows operating system, including playing sounds, selecting X509 certificates in a user-friendly manner, among other features.
Key Features
- Controls playback of a sound from a .wav file.
- Retrieves sounds associated with a set of Windows operating system sound-event types.
- User-friendly handling of X509 certificates.
How to Use
Below are examples demonstrating the usage of the key types provided by this package.
Playing a .wav File
using System.Media;
SoundPlayer player = new SoundPlayer("sound.wav");
player.Play();
// Wait while the sound plays.
Console.ReadKey();
Playing a System Sound
using System.Media;
SystemSounds.Asterisk.Play();
SystemSounds.Beep.Play();
SystemSounds.Exclamation.Play();
SystemSounds.Hand.Play();
SystemSounds.Question.Play();
Displaying a Certificate Selection Dialog
using System.Security.Cryptography.X509Certificates;
X509Store store = new X509Store(StoreName.My);
store.Open(OpenFlags.ReadOnly);
X509Certificate2Collection selectedCerts = X509Certificate2UI.SelectFromCollection(
store.Certificates,
"Select Certificate",
"Select a certificate from the following list:",
X509SelectionFlag.SingleSelection
);
store.Close();
if (selectedCerts.Count == 0)
{
Console.WriteLine("No certificate selected.");
}
else
{
Console.WriteLine($"Certificate selected: {selectedCerts[0].Subject}");
}
Main Types
The main types provided by this library are:
System.Media.SoundPlayer
System.Media.SystemSounds
System.Security.Cryptography.X509Certificates.X509Certificate2UI
System.Xaml.Permissions.XamlAccessLevel
Additional Documentation
- API documentation
Feedback & Contributing
System.Windows.Extensions is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
Showing the top 20 packages that depend on System.Windows.Extensions.
Packages | Downloads |
---|---|
System.Security.Permissions
Provides types supporting Code Access Security (CAS).
|
74 |
System.Security.Permissions
Provides types supporting Code Access Security (CAS).
|
76 |
System.Security.Permissions
Provides types supporting Code Access Security (CAS).
|
80 |
System.Security.Permissions
Provides types supporting Code Access Security (CAS).
|
81 |
System.Security.Permissions
Provides types supporting Code Access Security (CAS).
|
85 |
System.Security.Permissions
Provides types supporting Code Access Security (CAS).
|
96 |
System.Security.Permissions
Provides types supporting Code Access Security (CAS).
|
98 |
System.Security.Permissions
Provides types supporting Code Access Security (CAS).
|
106 |
System.Security.Permissions
Provides types supporting Code Access Security (CAS).
|
119 |
System.Security.Permissions
Provides types supporting Code Access Security (CAS).
When using NuGet 3.x this package requires at least version 3.4.
|
79 |
System.Security.Permissions
Provides types supporting Code Access Security (CAS).
When using NuGet 3.x this package requires at least version 3.4.
|
80 |
System.Security.Permissions
Provides types supporting Code Access Security (CAS).
When using NuGet 3.x this package requires at least version 3.4.
|
82 |
System.Security.Permissions
Provides types supporting Code Access Security (CAS).
When using NuGet 3.x this package requires at least version 3.4.
|
86 |
System.Security.Permissions
Provides types supporting Code Access Security (CAS).
When using NuGet 3.x this package requires at least version 3.4.
|
87 |
System.Security.Permissions
Provides types supporting Code Access Security (CAS).
When using NuGet 3.x this package requires at least version 3.4.
|
93 |
System.Security.Permissions
Provides types supporting Code Access Security (CAS).
When using NuGet 3.x this package requires at least version 3.4.
|
100 |
System.Security.Permissions
Provides types supporting Code Access Security (CAS).
When using NuGet 3.x this package requires at least version 3.4.
|
103 |
System.Security.Permissions
Provides types supporting Code Access Security (CAS).
When using NuGet 3.x this package requires at least version 3.4.
|
23,364 |
https://go.microsoft.com/fwlink/?LinkID=799421
.NET 8.0
- No dependencies.
.NET 9.0
- No dependencies.