PushNotificationReceivedEventArgs.Canceled 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.
Raised when the system is going to cancel the background task launched to handle the PushReceived event.
public:
virtual event BackgroundTaskCanceledEventHandler ^ Canceled;
// Register
event_token Canceled(BackgroundTaskCanceledEventHandler const& handler) const;
// Revoke with event_token
void Canceled(event_token const* cookie) const;
// Revoke with event_revoker
PushNotificationReceivedEventArgs::Canceled_revoker Canceled(auto_revoke_t, BackgroundTaskCanceledEventHandler const& handler) const;
public event BackgroundTaskCanceledEventHandler Canceled;
function onCanceled(eventArgs) { /* Your code */ }
pushNotificationReceivedEventArgs.addEventListener("canceled", onCanceled);
pushNotificationReceivedEventArgs.removeEventListener("canceled", onCanceled);
- or -
pushNotificationReceivedEventArgs.oncanceled = onCanceled;
Public Custom Event Canceled As BackgroundTaskCanceledEventHandler
Event Type
Remarks
For information on the reasons that the system may cancel a background task, see BackgroundTaskCancellationReason.