Udostępnij za pośrednictwem


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 not played. 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 design guidance.

Applies to