ToastNotification.Activated Event
Definition
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)
Event Type
TypedEventHandler<ToastNotification,IInspectable>
Remarks
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.
Applies to
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