AppNotificationBuilder Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides APIs for creating the XML string that defines the UI for app notifications.
public ref class AppNotificationBuilder sealed
/// [Windows.Foundation.Metadata.Activatable(65536, "Microsoft.Windows.AppNotifications.Builder.AppNotificationBuilderContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Windows.AppNotifications.Builder.AppNotificationBuilderContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class AppNotificationBuilder final
[Windows.Foundation.Metadata.Activatable(65536, "Microsoft.Windows.AppNotifications.Builder.AppNotificationBuilderContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Windows.AppNotifications.Builder.AppNotificationBuilderContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class AppNotificationBuilder
function AppNotificationBuilder()
Public NotInheritable Class AppNotificationBuilder
- Inheritance
- Attributes
Remarks
For guidance on using the AppNotificationBuilder APIs to create the UI for app notifications, see App notification content.
For reference information about the XML schema for app notifications, see App notification content schema.
Constructors
AppNotificationBuilder() |
Initializes a new instance of the AppNotificationBuilder class. |
Methods
AddArgument(String, String) |
Adds an argument composed of a key/value pair to the XML payload for an app notification. |
AddButton(AppNotificationButton) |
Adds a button to the app notification. |
AddComboBox(AppNotificationComboBox) |
Adds a combo box to the XML payload for an app notification. |
AddProgressBar(AppNotificationProgressBar) |
Adds a progress bar to the XML payload for an app notification. |
AddText(String, AppNotificationTextProperties) |
Adds a block of text, with display and localization options, to the XML payload for an app notification. |
AddText(String) |
Adds a block of text to the XML payload for an app notification. |
AddTextBox(String, String, String) |
Adds a text box with the specified placeholder text and title to the XML payload for an app notification. |
AddTextBox(String) |
Adds a text box to the XML payload for an app notification. |
BuildNotification() |
Returns an AppNotification object representing the XML payload for an app notification. |
IsUrgentScenarioSupported() |
Returns a value indicating whether the urgent app notification scenario is supported on the current device. |
MuteAudio() |
Requests that the system mute any audio associated with the app notification. |
SetAppLogoOverride(Uri, AppNotificationImageCrop, String) |
Sets the image that is displayed on the left side of an app notification, using the specified cropping method and alternate text. |
SetAppLogoOverride(Uri, AppNotificationImageCrop) |
Sets the image that is displayed on the left side of an app notification, using the specified cropping method. |
SetAppLogoOverride(Uri) |
Sets the image that is displayed on the left side of an app notification. |
SetAttributionText(String, String) |
Sets the attribution text for an app notification. |
SetAttributionText(String) |
Sets the attribution text for an app notification. |
SetAudioEvent(AppNotificationSoundEvent, AppNotificationAudioLooping) |
Sets the audio event and looping behavior for an app notification. |
SetAudioEvent(AppNotificationSoundEvent) |
Sets the audio event for an app notification. |
SetAudioUri(Uri, AppNotificationAudioLooping) |
Sets the sound file and the audio looping behavior that is played when an app notification is displayed. |
SetAudioUri(Uri) |
Sets the sound file that is played when an app notification is displayed. |
SetDuration(AppNotificationDuration) |
Sets the duration for an app notification. |
SetGroup(String) |
Sets the group identifier for an app notification. |
SetHeroImage(Uri, String) |
Sets the image that is displayed at the top of an app notification, taking up the full width of the notification, with the specified alternate text. |
SetHeroImage(Uri) |
Sets the image that is displayed at the top of an app notification, taking up the full width of the notification. |
SetInlineImage(Uri, AppNotificationImageCrop, String) |
Sets the image that is displayed inline, after any text elements, filling the full width of the visual area in an app notification, using the specified cropping behavior. |
SetInlineImage(Uri, AppNotificationImageCrop) |
Sets the image that is displayed inline, after any text elements, filling the full width of the visual area in an app notification, using the specified cropping behavior. |
SetInlineImage(Uri) |
Sets the image that is displayed inline, after any text elements, filling the full width of the visual area in an app notification. |
SetScenario(AppNotificationScenario) |
Sets the scenario for the app notification, which causes the system to adjust some of the notification behaviors to present a consistent experience for the specified scenario. |
SetTag(String) |
Sets the tag identifier for an app notification. |
SetTimeStamp(DateTime) |
Sets the custom time stamp for an app notification. |