AppNotificationBuilder.BuildNotification 方法

定義

會傳回代表代理程式更新之 XML 承載的 AppNotification 物件。

public:
 virtual AppNotification ^ BuildNotification() = BuildNotification;
AppNotification BuildNotification();
public AppNotification BuildNotification();
function buildNotification()
Public Function BuildNotification () As AppNotification

傳回

AppNotification物件。

範例

下列範例示範如何從AppNotificationBuilder實例建置AppNotification

var notification = new AppNotificationBuilder()
    .AddText("Notification text.")
    .BuildNotification();

AppNotificationManager.Default.Show(notification);

備註

使用 AppNotificationBuilder 的方法,將您想要包含在代理程式更新中的元素組合在一起。 呼叫BuildNotificaion以取得您可以傳入 AppNotificationManager.Show(AppNotification)AppNotification物件。

如需使用 AppNotificationBuilder API 建立代理程式更新 UI 的指引,請參閱 代理程式更新內容

如需代理程式更新之 XML 架構的參考資訊,請參閱 代理程式更新內容架構

適用於