AppNotificationBuilder.BuildNotification Method
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.
Returns an AppNotification object representing the XML payload for an app notification.
public:
virtual AppNotification ^ BuildNotification() = BuildNotification;
AppNotification BuildNotification();
public AppNotification BuildNotification();
function buildNotification()
Public Function BuildNotification () As AppNotification
Returns
An AppNotification object.
Examples
The following example demonstrates building an AppNotification from an instance of AppNotificationBuilder.
var notification = new AppNotificationBuilder()
.AddText("Notification text.")
.BuildNotification();
AppNotificationManager.Default.Show(notification);
Remarks
Use the methods of the AppNotificationBuilder to assemble the elements you want to include in an app notification. Call BuildNotificaion to get an AppNotification object that you can pass into Microsoft.Windows.AppNotifications.AppNotificationManager.Show.
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.