System.Windows.Extensions 9.0.10
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.SoundPlayerSystem.Media.SystemSoundsSystem.Security.Cryptography.X509Certificates.X509Certificate2UISystem.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). 
When using NuGet 3.x this package requires at least version 3.4. 
                                                 | 
                                                70 | 
| 
                                                    System.Security.Permissions
                                                     Provides types supporting Code Access Security (CAS). 
When using NuGet 3.x this package requires at least version 3.4. 
                                                 | 
                                                64 | 
| 
                                                    System.Security.Permissions
                                                     Provides types supporting Code Access Security (CAS). 
                                                 | 
                                                24 | 
| 
                                                    System.Security.Permissions
                                                     Provides types supporting Code Access Security (CAS). 
                                                 | 
                                                23 | 
| 
                                                    Microsoft.CodeAnalysis.Workspaces.MSBuild
                                                     .NET Compiler Platform ("Roslyn") support for analyzing MSBuild projects and solutions. This should be used with at least one
      of the following packages to add the appropriate language support:
      - Microsoft.CodeAnalysis.CSharp.Workspaces
      - Microsoft.CodeAnalysis.VisualBasic.Workspaces
    
      More details at https://aka.ms/roslyn-packages
      This package was built from the source at https://github.com/dotnet/roslyn/commit/f99bb16a395e48a05520ba7af1549b20bfdeee36. 
                                                 | 
                                                22 | 
| 
                                                    Microsoft.CodeAnalysis.Workspaces.MSBuild
                                                     .NET Compiler Platform ("Roslyn") support for analyzing MSBuild projects and solutions. This should be used with at least one
      of the following packages to add the appropriate language support:
      - Microsoft.CodeAnalysis.CSharp.Workspaces
      - Microsoft.CodeAnalysis.VisualBasic.Workspaces
    
      More details at https://aka.ms/roslyn-packages
      This package was built from the source at https://github.com/dotnet/roslyn/commit/e68227ea677b76a3c603bd616f03ea6d952b2458. 
                                                 | 
                                                22 | 
| 
                                                    System.Security.Permissions
                                                     Provides types supporting Code Access Security (CAS). 
                                                 | 
                                                21 | 
| 
                                                    Microsoft.CodeAnalysis.Workspaces.MSBuild
                                                     .NET Compiler Platform ("Roslyn") support for analyzing MSBuild projects and solutions. This should be used with at least one
      of the following packages to add the appropriate language support:
      - Microsoft.CodeAnalysis.CSharp.Workspaces
      - Microsoft.CodeAnalysis.VisualBasic.Workspaces
    
      More details at https://aka.ms/roslyn-packages
      This package was built from the source at https://github.com/dotnet/roslyn/commit/5e3a11e2e7f952da93f9d35bd63a2fa181c0608b. 
                                                 | 
                                                21 | 
| 
                                                    System.Security.Permissions
                                                     Provides types supporting Code Access Security (CAS). 
                                                 | 
                                                20 | 
| 
                                                    Microsoft.CodeAnalysis.Workspaces.MSBuild
                                                     .NET Compiler Platform ("Roslyn") support for analyzing MSBuild projects and solutions. This should be used with at least one
      of the following packages to add the appropriate language support:
      - Microsoft.CodeAnalysis.CSharp.Workspaces
      - Microsoft.CodeAnalysis.VisualBasic.Workspaces
    
      More details at https://aka.ms/roslyn-packages
      This package was built from the source at https://github.com/dotnet/roslyn/commit/be9c072e1c8a9e6701e34d796b1d68098d08feab. 
                                                 | 
                                                20 | 
| 
                                                    Microsoft.CodeAnalysis.Workspaces.MSBuild
                                                     .NET Compiler Platform ("Roslyn") support for analyzing MSBuild projects and solutions. This should be used with at least one
      of the following packages to add the appropriate language support:
      - Microsoft.CodeAnalysis.CSharp.Workspaces
      - Microsoft.CodeAnalysis.VisualBasic.Workspaces
    
      More details at https://aka.ms/roslyn-packages
      This package was built from the source at https://github.com/dotnet/roslyn/commit/bf8791d0d1be92c24e56cefa52aa139e2b5340c2. 
                                                 | 
                                                20 | 
| 
                                                    Microsoft.CodeAnalysis.Workspaces.MSBuild
                                                     .NET Compiler Platform ("Roslyn") support for analyzing MSBuild projects and solutions. This should be used with at least one
      of the following packages to add the appropriate language support:
      - Microsoft.CodeAnalysis.CSharp.Workspaces
      - Microsoft.CodeAnalysis.VisualBasic.Workspaces
    
      More details at https://aka.ms/roslyn-packages
      This package was built from the source at https://github.com/dotnet/roslyn/commit/bde21ee2b98b775b010d01a93f81ef587fe80962. 
                                                 | 
                                                20 | 
| 
                                                    Microsoft.CodeAnalysis.Workspaces.MSBuild
                                                     .NET Compiler Platform ("Roslyn") support for analyzing MSBuild projects and solutions. This should be used with at least one
      of the following packages to add the appropriate language support:
      - Microsoft.CodeAnalysis.CSharp.Workspaces
      - Microsoft.CodeAnalysis.VisualBasic.Workspaces
    
      More details at https://aka.ms/roslyn-packages
      This package was built from the source at https://github.com/dotnet/roslyn/commit/dfa7fc6bdea31a858a402168384192b633c811fa. 
                                                 | 
                                                20 | 
| 
                                                    System.Security.Permissions
                                                     Provides types supporting Code Access Security (CAS). 
                                                 | 
                                                19 | 
https://go.microsoft.com/fwlink/?LinkID=799421
.NET 8.0
- No dependencies.
 
.NET 9.0
- No dependencies.