StoreContext.OfflineLicensesChanged Event


Raised when the status of the app's license changes (for example, the trial period has expired or the user has purchased the full version of the app).

// Register
event_token OfflineLicensesChanged(TypedEventHandler<StoreContext, IInspectable const&> const& handler) const;

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

// Revoke with event_revoker
StoreContext::OfflineLicensesChanged_revoker OfflineLicensesChanged(auto_revoke_t, TypedEventHandler<StoreContext, IInspectable const&> const& handler) const;
public event TypedEventHandler<StoreContext,object> OfflineLicensesChanged;
function onOfflineLicensesChanged(eventArgs) { /* Your code */ }
storeContext.addEventListener("offlinelicenseschanged", onOfflineLicensesChanged);
storeContext.removeEventListener("offlinelicenseschanged", onOfflineLicensesChanged);
- or -
storeContext.onofflinelicenseschanged = onOfflineLicensesChanged;
Public Custom Event OfflineLicensesChanged As TypedEventHandler(Of StoreContext, Object) 

Event Type




When this event is raised, you can get the latest app license from the Microsoft Store by calling the GetAppLicenseAsync method. The StoreAppLicense object returned by this method also contains the latest add-on licenses for the app in the AddOnLicenses property.

For more information about the OfflineLicensesChanged event, including a code example, see Implement a trial version of your app.


This event is the equivalent of the LicenseChanged event in the Windows.ApplicationModel.Store namespace.

Applies to

See also