ToastContentBuilder.SetToastDuration(ToastDuration) Method

Definition

Sets the amount of time the Toast should display. You typically should use the Scenario attribute instead, which impacts how long a Toast stays on screen.

public Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder SetToastDuration (Microsoft.Toolkit.Uwp.Notifications.ToastDuration duration);
member this.SetToastDuration : Microsoft.Toolkit.Uwp.Notifications.ToastDuration -> Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder
Public Function SetToastDuration (duration As ToastDuration) As ToastContentBuilder

Parameters

duration
ToastDuration

Duration of the toast

Returns

The current instance of ToastContentBuilder

Applies to