Microsoft.Windows.AppNotifications.Builder 命名空间

提供 API,用于以编程方式为 AppNotification 生成 XML 有效负载。

AppNotificationBuilder

提供用于创建定义应用通知 UI 的 XML 字符串的 API。

AppNotificationButton

表示显示在应用通知上的按钮。

AppNotificationComboBox

表示显示在应用通知上的组合框。

AppNotificationProgressBar

表示在应用通知上显示的进度栏。

AppNotificationTextProperties

指定应用通知上显示的文本的显示和本地化属性。

枚举

AppNotificationAudioLooping

指定应用通知音频的循环行为。

AppNotificationButtonStyle

指定可分配给 AppNotificationButton 的按钮样式,以便为常见方案提供一致的体验。

AppNotificationDuration

指定 显示 AppNotification 的持续时间。

AppNotificationImageCrop

指定 AppNotification 中图像的裁剪选项。

AppNotificationScenario

指定应用通知的方案,这会导致系统调整某些通知行为,以便为指定方案提供一致的体验。

AppNotificationSoundEvent

指定在显示应用通知时可以播放的系统声音事件。

示例

应用通知概述

注解

应用通知在 XML 字符串中定义。 此命名空间提供 API,使以编程方式轻松生成 XML 有效负载。 此功能包含在Windows 应用 SDK中,旨在替换以前由 UWP 社区工具包通知 nuget 包中的 ToastContentBuilder 类提供的功能。

有关使用 AppNotificationBuilder API 创建应用通知 UI 的指导,请参阅 应用通知内容

有关应用通知的 XML 架构的参考信息,请参阅 应用通知内容架构