共用方式為


NotificationData 類別

定義

儲存快 顯通知中顯示的資料。

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」。

適用於

另請參閱