AppNotificationBuilder.BuildNotification 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
會傳回代表代理程式更新之 XML 承載的 AppNotification 物件。
public:
virtual AppNotification ^ BuildNotification() = BuildNotification;
AppNotification BuildNotification();
public AppNotification BuildNotification();
function buildNotification()
Public Function BuildNotification () As 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 架構的參考資訊,請參閱 代理程式更新內容架構。