Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 3.55 KB

toastnotification.md

File metadata and controls

38 lines (28 loc) · 3.55 KB
-api-id -api-type -api-device-family-note
T:Windows.UI.Notifications.ToastNotification
winrt class
xbox

Windows.UI.Notifications.ToastNotification

-description

Defines the content, associated metadata and events, and expiration time of a toast notification.

-remarks

For how-to guidance for implementing toast notifications in your app, see Send a local toast notification from C# apps.

Guidance for handling app activation for toast notifications:

  • UWP Applications should use the OnActivated for handling toast activations.
  • Starting with WinRT Build 19041, packaged apps (including packaged apps with external location) are able to use ToastNotificationActionTrigger for handling activations for more details.
  • Desktop apps can use COM activation by following Desktop - Send Local Toast.
  • If none of the activation options fit your application, follow the example in this document for properly using event handlers.

Version history

Windows version SDK version Value added
1607 14393 NotificationMirroring
1607 14393 RemoteId
1703 15063 Data
1703 15063 Priority
1903 18362 ExpiresOnReboot

-see-also

Toast notifications sample, Sending toast notifications from desktop apps sample, Toast XML schema, Tiles, badges, and notifications, Quickstart: Sending a toast notification, Quickstart: Sending a toast push notification, Quickstart: Sending a toast notification from the desktop, Guidelines and checklist for toast notifications, How to handle activation from a toast notification, How to opt in for toast notifications, How to schedule a toast notification, How to enable desktop toast notifications through an AppUserModelID, The toast template catalog, Toast audio options