WP8.1如何查看内购价格?

How to discover In-App Purchase price in the WP8.1?

在导航到应用内购买确认之前,有什么方法可以发现应用内购买价格吗?我想在我的应用程序的自定义界面中设置价格。我想通过 Windows Phone 商店或应用内购买 API.

动态获取价格
 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());
}