ToastContentBuilder Class

Definition

Builder class used to create ToastContent

public class ToastContentBuilder
type ToastContentBuilder = class
Public Class ToastContentBuilder
Inheritance
ToastContentBuilder

Constructors

ToastContentBuilder()

Initializes a new instance of the ToastContentBuilder class.

Properties

Content

Gets internal instance of ToastContent. This is equivalent to the call to GetToastContent().

Methods

AddAppLogoOverride(Uri, Nullable<ToastGenericAppLogoCrop>, String, Nullable<Boolean>)

Override the app logo with custom image of choice that will be displayed on the toast.

AddArgument(String)

Adds a key (without value) to the activation arguments that will be returned when the toast notification or its buttons are clicked.

AddArgument(String, Boolean)

Adds a key/value to the activation arguments that will be returned when the toast notification or its buttons are clicked.

AddArgument(String, Double)

Adds a key/value to the activation arguments that will be returned when the toast notification or its buttons are clicked.

AddArgument(String, Enum)

Adds a key/value to the activation arguments that will be returned when the toast notification or its buttons are clicked.

AddArgument(String, Int32)

Adds a key/value to the activation arguments that will be returned when the toast notification or its buttons are clicked.

AddArgument(String, Single)

Adds a key/value to the activation arguments that will be returned when the toast notification or its buttons are clicked.

AddArgument(String, String)

Adds a key/value to the activation arguments that will be returned when the toast notification or its buttons are clicked.

AddAttributionText(String)

Add an Attribution Text to be displayed on the toast.

AddAttributionText(String, String)

Add an Attribution Text to be displayed on 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.

AddButton(IToastButton)

Add a button to the current toast.

AddButton(String, String, ToastActivationType, String)

Add an button to the toast that will be display to the right of the input text box, achieving a quick reply scenario.

AddButton(String, String, ToastActivationType, String, Uri)

Add an button to the toast that will be display to the right of the input text box, achieving a quick reply scenario.

AddButton(String, ToastActivationType, String)

Add a button to the current toast.

AddButton(String, ToastActivationType, String, Uri)

Add a button to the current toast.

AddComboBox(String, String, String, IEnumerable<ValueTuple<String,String>>)

Add a combo box / drop-down menu that contain options for user to select.

AddComboBox(String, String, String, ValueTuple<String,String>[])

Add a combo box / drop-down menu that contain options for user to select.

AddComboBox(String, String, ValueTuple<String,String>[])

Add a combo box / drop-down menu that contain options for user to select.

AddComboBox(String, ValueTuple<String,String>[])

Add a combo box / drop-down menu that contain options for user to select.

AddCustomTimeStamp(DateTime)

Add custom time stamp on the toast to override the time display on the toast.

AddHeader(String, String, String)

Add a header to a toast.

AddHeader(String, String, ToastArguments)

Add a header to a toast.

AddHeroImage(Uri, String, Nullable<Boolean>)

Add a hero image to the toast.

AddInlineImage(Uri, String, Nullable<Boolean>, Nullable<AdaptiveImageCrop>, Nullable<Boolean>)

Add an image inline with other toast content.

AddInputTextBox(String, String, String)

Add an input text box that the user can type into.

AddProgressBar(String, Nullable<Double>, Boolean, String, String)

Add a progress bar to the toast.

AddText(String, Nullable<AdaptiveTextStyle>, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>, Nullable<AdaptiveTextAlign>, String)

Add text to the toast.

AddToastActivationInfo(String, ToastActivationType)

Instead of this method, for foreground/background activation, it is suggested to use AddArgument(String, String) and optionally SetBackgroundActivation(). For protocol activation, you should use SetProtocolActivation(Uri). Add info that can be used by the application when the app was activated/launched by the toast.

AddToastInput(IToastInput)

Add an input option to the Toast.

AddVisualChild(IToastBindingGenericChild)

Add a visual element to the toast.

CreateProgressBarData(ToastContent, Int32, String, Nullable<Double>, String, String, UInt32)

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

GetToastContent()

Get the instance of ToastContent that has been built by the builder with specified configuration so far.

GetXml()

Retrieves the notification XML content as a WinRT XmlDocument, so that it can be used with a local Toast notification's constructor on either Windows.UI.Notifications.ToastNotification or Windows.UI.Notifications.ScheduledToastNotification.

Schedule(DateTimeOffset)

Schedules the notification.

Schedule(DateTimeOffset, CustomizeScheduledToast)

Schedules the notification.

Schedule(DateTimeOffset, CustomizeScheduledToastAsync)

Schedules the notification.

SetBackgroundActivation()

Configures the toast notification to use background activation when the toast body is clicked.

SetProtocolActivation(Uri)

Configures the toast notification to launch the specified url when the toast body is clicked.

SetProtocolActivation(Uri, String)

Configures the toast notification to launch the specified url when the toast body is clicked.

SetToastDuration(ToastDuration)

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.

SetToastScenario(ToastScenario)

Sets the scenario, to make the Toast behave like an alarm, reminder, or more.

Show()

Shows a new toast notification with the current content.

Show(CustomizeToast)

Shows a new toast notification with the current content.

Show(CustomizeToastAsync)

Shows a new toast notification with the current content.

Applies to