StoreContext.OfflineLicensesChanged StoreContext.OfflineLicensesChanged StoreContext.OfflineLicensesChanged StoreContext.OfflineLicensesChanged StoreContext.OfflineLicensesChanged Event

Definition

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).

public : event TypedEventHandler<StoreContext, object> OfflineLicensesChanged
// Register
event_token OfflineLicensesChanged(TypedEventHandler<StoreContext, object> const& handler) const;

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

// Revoke with event_revoker
OfflineLicensesChanged_revoker OfflineLicensesChanged(auto_revoke_t, TypedEventHandler<StoreContext, object> const& handler) const;
public event TypedEventHandler<StoreContext, object> OfflineLicensesChanged
Public Event OfflineLicensesChanged As TypedEventHandler (Of StoreContext, object)
function onOfflineLicensesChanged(eventArgs){/* Your code */}


storeContext.addEventListener("offlinelicenseschanged", onOfflineLicensesChanged);
storeContext.removeEventListener("offlinelicenseschanged", onOfflineLicensesChanged);

Remarks

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.

Note

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

See also