Jaa


ElementSoundPlayer.State Property

Definition

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

public:
 static property ElementSoundPlayerState State { ElementSoundPlayerState get(); void set(ElementSoundPlayerState value); };
static ElementSoundPlayerState State();

static void State(ElementSoundPlayerState value);
public static ElementSoundPlayerState State { get; set; }
var elementSoundPlayerState = ElementSoundPlayer.state;
ElementSoundPlayer.state = elementSoundPlayerState;
Public Shared Property State As ElementSoundPlayerState

Property Value

A value of the enumeration that specifies whether the system plays control sounds. The default is Auto.

Remarks

By default, control sounds are played on the Xbox, and are not played on other devices families. You can set ElementSoundPlayerState to On to make your app play sounds on all device families, or set it to Off to disable sounds on all device families.

For more info, see Sound in UWP apps.

Applies to