ToastContentBuilder.AddAudio Method

Definition

Overloads

AddAudio(Uri, Nullable<Boolean>, Nullable<Boolean>)

Set custom audio to go along with the toast.

AddAudio(ToastAudio)

Set custom audio to go along with the toast.

AddAudio(Uri, Nullable<Boolean>, Nullable<Boolean>)

Set custom audio to go along with the toast.

public Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder AddAudio (Uri src, bool? loop = default, bool? silent = default);
member this.AddAudio : Uri * Nullable<bool> * Nullable<bool> -> Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder
Public Function AddAudio (src As Uri, Optional loop As Nullable(Of Boolean) = Nothing, Optional silent As Nullable(Of Boolean) = Nothing) As ToastContentBuilder

Parameters

src
Uri

Source to the media that will be played when the toast is pop

loop
Nullable<Boolean>

Indicating whether sound should repeat as long as the Toast is shown; false to play only once (default).

silent
Nullable<Boolean>

Indicating whether sound is muted; false to allow the Toast notification sound to play (default).

Returns

The current instance of ToastContentBuilder

Applies to

AddAudio(ToastAudio)

Set custom audio to go along with the toast.

public Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder AddAudio (Microsoft.Toolkit.Uwp.Notifications.ToastAudio audio);
member this.AddAudio : Microsoft.Toolkit.Uwp.Notifications.ToastAudio -> Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder
Public Function AddAudio (audio As ToastAudio) As ToastContentBuilder

Parameters

audio
ToastAudio

The ToastAudio to set.

Returns

The current instance of ToastContentBuilder

Applies to