ToastContentBuilder.CreateProgressBarData Method

Definition

Create an instance of NotificationData that can be used to update toast that has a progress bar.

public static Windows.UI.Notifications.NotificationData CreateProgressBarData (Microsoft.Toolkit.Uwp.Notifications.ToastContent toast, int index = 0, string title = default, double? value = default, string valueStringOverride = default, string status = default, uint sequence = 0);
static member CreateProgressBarData : Microsoft.Toolkit.Uwp.Notifications.ToastContent * int * string * Nullable<double> * string * string * uint32 -> Windows.UI.Notifications.NotificationData
Public Shared Function CreateProgressBarData (toast As ToastContent, Optional index As Integer = 0, Optional title As String = Nothing, Optional value As Nullable(Of Double) = Nothing, Optional valueStringOverride As String = Nothing, Optional status As String = Nothing, Optional sequence As UInteger = 0) As NotificationData

Parameters

toast
ToastContent

Instance of ToastContent that contain progress bars that need to be updated

index
Int32

Index of the progress bar (0-based) that this notification data is updating in the case that toast has multiple progress bars. Default to 0.

title
String

Title of the progress bar.

value
Nullable<Double>

Value of the progress bar.

valueStringOverride
String

An optional string to be displayed instead of the default percentage string. If this isn't provided, something like "70%" will be displayed.

status
String

A status string, which is displayed underneath the progress bar on the left. Default to empty.

sequence
UInt32

A sequence number to prevent out-of-order updates, or assign 0 to indicate "always update".

Returns

Windows.UI.Notifications.NotificationData

An instance of NotificationData that can be used to update the toast.

Applies to