public async void InitializeLicenseAsync() { if (storeContext == null) { storeContext = StoreContext.GetDefault(); storeContext.As <IInitializeWithWindow>().Initialize(new WindowInteropHelper(this).Handle); } ProgressRing.IsActive = true; appLicense = await storeContext.GetAppLicenseAsync(); ProgressRing.IsActive = false; if (appLicense.IsTrial) { await ShowStoreContextControlAsync(appLicense); } storeContext.OfflineLicensesChanged += StoreContext_OfflineLicensesChanged; }