StoreContext.OfflineLicensesChanged 事件

定義

例如,當應用程式授權的狀態變更 (時引發,例如試用期間已過期,或使用者已購買應用程式的完整版本) 。

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

事件類型

備註

引發此事件時,您可以藉由呼叫 GetAppLicenseAsync 方法,從 Microsoft Store 取得最新的應用程式授權。 此方法所傳回的 StoreAppLicense 物件也包含 AddOnLicenses 屬性中應用程式的最新附加元件授權。

如需 OfflineLicensesChanged 事件的詳細資訊,包括程式碼範例,請參閱 實作應用程式的試用版

注意

這個事件相當於Windows.ApplicationModel.Store命名空間中的LicenseChanged事件。

適用於

另請參閱