NotificationData 类

定义

存储数据以在 Toast 通知中显示。

public ref class NotificationData sealed
/// [Windows.Foundation.Metadata.Activatable(262144, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Activatable(Windows.UI.Notifications.INotificationDataFactory, 262144, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class NotificationData final
[Windows.Foundation.Metadata.Activatable(262144, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.UI.Notifications.INotificationDataFactory), 262144, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class NotificationData
function NotificationData(initialValues, sequenceNumber)
Public NotInheritable Class NotificationData
继承
Object Platform::Object IInspectable NotificationData
属性

Windows 要求

设备系列
Windows 10 Creators Update (在 10.0.15063.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v4.0 中引入)

构造函数

NotificationData()

创建新的 NotificationData

NotificationData(IIterable<KeyValuePair<String,String>>)

创建包含指定值的新 NotificationData

NotificationData(IIterable<KeyValuePair<String,String>>, UInt32)

创建一个新的 NotificationData ,其中包含指定的值和指定的序列号。

属性

SequenceNumber

获取或设置此通知数据的序列号。 系统使用序列号来确定通知数据是否过期。

Values

获取新 NotificationData 的键和值的集合,例如“progressValue”、“0”。

适用于

另请参阅