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 AppNotificationManager.Show(AppNotification).
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.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for