ListingInformation ListingInformation ListingInformation ListingInformation Class

Provides the listing info that describes the app in the Windows Store.

Syntax

Declaration

public sealed class ListingInformationpublic sealed class ListingInformationPublic NotInheritable Class ListingInformationpublic sealed class ListingInformation

Remarks

The info that this object returns comes from the listing info you enter when you submit the app to the Windows 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 Windows Store.

Note

The CurrentApp object obtains its data from the Windows Store, so you must have a Windows Store developer account and the app must be published in the Windows Store. If you don't have a Windows Store developer account, you can test the functions of this class by using the CurrentAppSimulator.

Examples

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 current app object using the simulator interface
currentApp = Windows.ApplicationModel.Store.CurrentAppSimulator;

// get the listing information for the products this app supports
currentApp.loadListingInformationAsync().then(
    function (listing) {
        // loadListingInformationAsync returns the ListingInformation object in listing.
        // get one of the listing properties
        thisAppsPrice = listing.formattedPrice;
    }
);
// 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;

Properties summary

Gets the age rating for the app.

Gets the currency code associated with the user's market, such as USD or CAD.

Gets the country code associated with the user's location, such as US or CA, that is used to identify their market for transactions in the current session.

Gets the app's description in the current market.

Gets the app's base price formatted for the current market and currency.

Gets the app's purchase price formatted for the current market and currency.

Gets a value that indicates whether the app is on sale.

Gets the app's name in the current market.

Gets information about add-ons (also called in-app products or IAPs) available for purchase.

Gets the end date of the sale period for the app.

Properties

  • AgeRating
    AgeRating
    AgeRating
    AgeRating

    Gets the age rating for the app.

    public uint AgeRating { get; }public uint AgeRating { get; }Public ReadOnly Property AgeRating As uintpublic uint AgeRating { get; }

    Property Value

    • uint
      uint
      uint
      uint

      The age rating.

  • CurrencyCode
    CurrencyCode
    CurrencyCode
    CurrencyCode

    Gets the currency code associated with the user's market, such as USD or CAD.

    public string CurrencyCode { get; }public string CurrencyCode { get; }Public ReadOnly Property CurrencyCode As stringpublic string CurrencyCode { get; }

    Property Value

    • string
      string
      string
      string

      The currency code associated with the user's market, such as USD or CAD.

    Remarks

    The currency code string returned by this property conforms to ISO 4217.

  • CurrentMarket
    CurrentMarket
    CurrentMarket
    CurrentMarket

    Gets the country code associated with the user's location, such as US or CA, that is used to identify their market for transactions in the current session.

    public string CurrentMarket { get; }public string CurrentMarket { get; }Public ReadOnly Property CurrentMarket As stringpublic string CurrentMarket { get; }

    Property Value

    • string
      string
      string
      string

      The country code associated with the user's location, such as US or CA.

  • Description
    Description
    Description
    Description

    Gets the app's description in the current market.

    public string Description { get; }public string Description { get; }Public ReadOnly Property Description As stringpublic string Description { get; }

    Property Value

    • string
      string
      string
      string

      The app's description in the current market.

  • FormattedBasePrice
    FormattedBasePrice
    FormattedBasePrice
    FormattedBasePrice

    Gets the app's base price formatted for the current market and currency.

    public string FormattedBasePrice { get; }public string FormattedBasePrice { get; }Public ReadOnly Property FormattedBasePrice As stringpublic string FormattedBasePrice { get; }

    Property Value

    • string
      string
      string
      string

      The app's base price with the appropriate formatting for the current market and currency.

    Remarks

    The base price is the default price for the app. If the app is on sale in the current market, use the FormattedPrice property to get the sale price. If the app is not on sale, FormattedBasePrice and FormattedPrice return the same value.

  • FormattedPrice
    FormattedPrice
    FormattedPrice
    FormattedPrice

    Gets the app's purchase price formatted for the current market and currency.

    public string FormattedPrice { get; }public string FormattedPrice { get; }Public ReadOnly Property FormattedPrice As stringpublic string FormattedPrice { get; }

    Property Value

    • string
      string
      string
      string

      The app's purchase price with the appropriate formatting for the current market and currency.

    Remarks

    If the app is on sale in the current market, the FormattedPrice property returns the sale price. Use the FormattedBasePrice property to get the default price. If the app is not on sale, FormattedBasePrice and FormattedPrice return the same value.

  • IsOnSale
    IsOnSale
    IsOnSale
    IsOnSale

    Gets a value that indicates whether the app is on sale.

    public bool IsOnSale { get; }public bool IsOnSale { get; }Public ReadOnly Property IsOnSale As boolpublic bool IsOnSale { get; }

    Property Value

    • bool
      bool
      bool
      bool

      Returns true if the app is on sale, and otherwise false.

    Remarks

    For information about putting apps on sale, see Put apps and add-ons on sale.

  • Name
    Name
    Name
    Name

    Gets the app's name in the current market.

    public string Name { get; }public string Name { get; }Public ReadOnly Property Name As stringpublic string Name { get; }

    Property Value

    • string
      string
      string
      string

      The app's name in the current market.

  • ProductListings
    ProductListings
    ProductListings
    ProductListings

    Gets information about add-ons (also called in-app products or IAPs) available for purchase.

    public IMapView<string, ProductListing> ProductListings { get; }public IMapView<string, ProductListing> ProductListings { get; }Public ReadOnly Property ProductListings As IMapView<string, ProductListing>public IMapView<string, ProductListing> ProductListings { get; }

    Property Value

    • The array of ProductListing objects that describes the app's add-ons.

  • SaleEndDate
    SaleEndDate
    SaleEndDate
    SaleEndDate

    Gets the end date of the sale period for the app.

    public DateTime SaleEndDate { get; }public DateTimeOffset SaleEndDate { get; }Public ReadOnly Property SaleEndDate As DateTimeOffsetpublic DateTime SaleEndDate { get; }

    Property Value

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ThreadingAttribute

Details

Assembly

Windows.ApplicationModel.Store.dll