InApp产品购买Windows Phone 8后,NavigationService.Navigate()无效

时间:2014-11-12 10:23:31

标签: windows-phone-8 in-app-purchase

我正在使用以下代码在我的应用程序中进行Inapp购买。

            if (!CurrentApp.LicenseInformation.ProductLicenses[product.ProductID].IsActive)
            {
                var receipt = await CurrentApp.RequestProductPurchaseAsync(product.ProductID, true);
            }
            if (CurrentApp.LicenseInformation.ProductLicenses[product.ProductID].IsActive)
            {
                 //Update the Purchase into  the Local Settings
                MessageBox.Show("Inapp product bought successfully", "Info", MessageBoxButton.OK);
                //Because the Purchase is successful move to a diffferent page 
                NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.RelativeOrAbsolute));        
            }
            else
            {
               MessageBox.Show("Inapp purchase Failed", "Info", MessageBoxButton.OK);
            }

与Inapp购买相关的一切工作都非常好但在购买成功后导航到页面没有发生。它只停留在发起购买的同一页面上。

0 个答案:

没有答案