ToastNotification.Activated Event
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when user activates a toast notification through a click or touch. Apps that are running subscribe to this event.
// Register
event_token Activated(TypedEventHandler<ToastNotification, IInspectable const&> const& handler) const;
// Revoke with event_token
void Activated(event_token const* cookie) const;
// Revoke with event_revoker
ToastNotification::Activated_revoker Activated(auto_revoke_t, TypedEventHandler<ToastNotification, IInspectable const&> const& handler) const;
public event TypedEventHandler<ToastNotification,object> Activated;
function onActivated(eventArgs) { /* Your code */ }
toastNotification.addEventListener("activated", onActivated);
toastNotification.removeEventListener("activated", onActivated);
- or -
toastNotification.onactivated = onActivated;
Public Custom Event Activated As TypedEventHandler(Of ToastNotification, Object)
TypedEventHandler<ToastNotification,IInspectable>
In the case of toast raised by a desktop app, that app must subscribe to at least the Activated event so that it can handle the expected activation of the app from the toast when the user selects it.
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |
- 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