-api-id | -api-type |
---|---|
T:Windows.ApplicationModel.Store.ListingInformation |
winrt class |
Provides the listing info that describes the app in the Microsoft Store.
The info that this object returns comes from the listing info you enter when you submit the app to the Microsoft Store.
You access this object through the LoadListingInformationAsync method of the CurrentAppSimulator object during testing, or the LoadListingInformationAsync method of the CurrentApp object when the app is distributed through the Microsoft Store.
Note
The CurrentApp object obtains its data from the Microsoft Store, so you must have a Microsoft Store developer account and the app must be published in the Microsoft Store. If you don't have a Microsoft Store developer account, you can test the functions of this class by using the CurrentAppSimulator.
Windows version | SDK version | Value added |
---|---|---|
1511 | 10586 | CurrencyCode |
1511 | 10586 | FormattedBasePrice |
1511 | 10586 | IsOnSale |
1511 | 10586 | SaleEndDate |
This code example shows how to get the ListingInformation from simulated app data and then get the ProductListing object for one of the features offered by the app.
// get the license info for this app from the simulator
ListingInformation listing = await CurrentAppSimulator.LoadListingInformationAsync();
// get the price of the app from the listing info.
String thisAppsPrice = listing.FormattedPrice;