Share via


UserDataProtectionManager.DataAvailabilityStateChanged Event

Definition

This event invokes listeners when the state of data availability has changed. For example, when the device locks, data protected to the 'WhileUnlocked' UserDataAvailability becomes unavailable. This state change can be listened to by subscribing to this event.

// Register
event_token DataAvailabilityStateChanged(TypedEventHandler<UserDataProtectionManager, UserDataAvailabilityStateChangedEventArgs const&> const& handler) const;

// Revoke with event_token
void DataAvailabilityStateChanged(event_token const* cookie) const;

// Revoke with event_revoker
UserDataProtectionManager::DataAvailabilityStateChanged_revoker DataAvailabilityStateChanged(auto_revoke_t, TypedEventHandler<UserDataProtectionManager, UserDataAvailabilityStateChangedEventArgs const&> const& handler) const;
public event TypedEventHandler<UserDataProtectionManager,UserDataAvailabilityStateChangedEventArgs> DataAvailabilityStateChanged;
function onDataAvailabilityStateChanged(eventArgs) { /* Your code */ }
userDataProtectionManager.addEventListener("dataavailabilitystatechanged", onDataAvailabilityStateChanged);
userDataProtectionManager.removeEventListener("dataavailabilitystatechanged", onDataAvailabilityStateChanged);
- or -
userDataProtectionManager.ondataavailabilitystatechanged = onDataAvailabilityStateChanged;
Public Custom Event DataAvailabilityStateChanged As TypedEventHandler(Of UserDataProtectionManager, UserDataAvailabilityStateChangedEventArgs) 

Event Type

Applies to