Windows phone 8.1 如何在WP8.1中发现应用内购买价格?
在导航到应用内购买确认之前,是否有任何方法可以发现应用内购买价格?我想在我的应用程序的自定义界面中放置价格。我想通过Windows Phone商店或应用内购买API动态获取价格Windows phone 8.1 如何在WP8.1中发现应用内购买价格?,windows-phone-8.1,windows-phone,in-app-purchase,winrt-xaml,Windows Phone 8.1,Windows Phone,In App Purchase,Winrt Xaml,在导航到应用内购买确认之前,是否有任何方法可以发现应用内购买价格?我想在我的应用程序的自定义界面中放置价格。我想通过Windows Phone商店或应用内购买API动态获取价格 try { //StoreManager mySM = new StoreManager(); ListingInformation li = await Store.CurrentApp.LoadListingInformationAsync(); foreach (string key i
try
{
//StoreManager mySM = new StoreManager();
ListingInformation li = await Store.CurrentApp.LoadListingInformationAsync();
foreach (string key in li.ProductListings.Keys)
{
ProductListing pListing = li.ProductListings[key];
System.Diagnostics.Debug.WriteLine(key);
string status = Store.CurrentApp.LicenseInformation.ProductLicenses[key].IsActive ? "Purchased" : pListing.FormattedPrice;
string imageLink = string.Empty;
picItems.Add(
new ProductItem {
imgLink = key.Equals("molostickerdummy") ? "/Res/41.png" : "/Res/18.png",
Name = pListing.Name,
Status = status,
key = key,
BuyNowButtonVisible = Store.CurrentApp.LicenseInformation.ProductLicenses[key].IsActive ? System.Windows.Visibility.Collapsed : System.Windows.Visibility.Visible
}
);
}
pics.ItemsSource = picItems;
}
catch (Exception e)
{
System.Diagnostics.Debug.WriteLine(e.ToString());
}