ElementSoundPlayer ElementSoundPlayer ElementSoundPlayer ElementSoundPlayer Class


Represents a player for XAML control sounds.

public : sealed class ElementSoundPlayer
struct winrt::Windows::UI::Xaml::ElementSoundPlayer
public sealed class ElementSoundPlayer
Public NotInheritable Class ElementSoundPlayer

Windows 10 requirements

Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)



For more info, design guidance, and code examples, see Sound.

If you have the XAML Controls Gallery app installed, click here to open the app and see the ElementSoundPlayer in action.


For more info, see Sound in UWP apps.

Version history

Windows version SDK version Value added
1803 17134 SpatialAudioMode


SpatialAudioMode SpatialAudioMode SpatialAudioMode SpatialAudioMode

Gets or sets a value that indicates whether spatial audio is on, off, or handled automatically.

State State State State

Gets or sets a value that specifies whether the system plays control sounds.

Volume Volume Volume Volume

Gets or sets the volume of the sounds played by the Play method.


Play(ElementSoundKind) Play(ElementSoundKind) Play(ElementSoundKind) Play(ElementSoundKind)

Plays the specified sound.