PushNotificationReceivedEventArgs.Canceled Event

Definition

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.

Applies to