ElementSoundPlayer Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a player for XAML control sounds.
public ref class ElementSoundPlayer sealed
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.WinUIContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class ElementSoundPlayer final
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.WinUIContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class ElementSoundPlayer
Public NotInheritable Class ElementSoundPlayer
- Inheritance
- Attributes
Savjet
For more info, design guidance, and code examples, see Sound.
The WinUI 3 Gallery app includes interactive examples of most WinUI 3 controls, features, and functionality. Get the app from the Microsoft Store or get the source code on GitHub.
For more info, see Sound design guidance.
Spatial |
Gets or sets a value that indicates whether spatial audio is on, off, or handled automatically. |
State |
Gets or sets a value that specifies whether the system plays control sounds. |
Volume |
Gets or sets the volume of the sounds played by the Play method. |
Play(Element |
Plays the specified sound. |
Proizvod | Verzije |
---|---|
Windows App SDK | 0.8, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6 |