Share via


StoreProduct Class

Definition

Represents a product that is available in the Microsoft Store.

public ref class StoreProduct sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Services.Store.StoreContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class StoreProduct final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Services.Store.StoreContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class StoreProduct
Public NotInheritable Class StoreProduct
Inheritance
Object Platform::Object IInspectable StoreProduct
Attributes

Windows requirements

Device family
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
API contract
Windows.Services.Store.StoreContract (introduced in v1.0)

Remarks

Products in the Store are organized in a hierarcy of product, SKU, and availability objects. Products are represented by StoreProduct objects. The SKUs for each product are represented by StoreSku objects, and the availabilities for each SKU are represented by StoreAvailability objects. For more information, see In-app purchases and trials.

To retrieve a StoreProduct object for the current app, use the GetStoreProductForCurrentAppAsync method.

To retrieve StoreProduct objects for products that can be purchased from within the current app, use these methods.

Properties

Description

Gets the product description from the Microsoft Store listing.

ExtendedJsonData

Gets complete data for the product from the Store in JSON format.

HasDigitalDownload

Gets a value that indicates whether the product has optional downloadable content (DLC).

Images

Gets the images from the Windows Store listing for the product.

InAppOfferToken

Gets the product ID for this product, if the current StoreProduct represents an add-on.

IsInUserCollection

Gets a value that indicates whether the current user has an entitlement to use the default SKU of the product.

Keywords

Gets the keywords that are associated with the product in Partner Center. This property only applies to StoreProduct objects that represent add-ons. These strings correspond to the value of the Keywords field in the properties page for the add-on in Partner Center.

Language

Gets the language for the data in the Microsoft Store listing for the product.

LinkUri

Gets the URI to the Microsoft Store listing for the product.

Price

Gets the price for the default SKU and availability for the product.

ProductKind

Gets the type of the product. These values are currently supported: Application, Game, Consumable, UnmanagedConsumable, and Durable.

Skus

Gets the list of available SKUs for the product.

StoreId

Gets the Store ID for this product.

Title

Gets the product title from the Microsoft Store listing.

Videos

Gets the videos from the Windows Store listing for the product.

Methods

GetIsAnySkuInstalledAsync()

Indicates whether any SKU of this product is installed on the current device. This method is intended to be used for products that have downloadable content (DLC).

RequestPurchaseAsync()

Requests the purchase of the default SKU and availability for the product and displays the UI that is used to complete the transaction via the Microsoft Store.

Important

This method must be called on the UI thread.

RequestPurchaseAsync(StorePurchaseProperties)

Requests the purchase of the default SKU and availability for the product and displays the UI that is used to complete the transaction via the Microsoft Store. This method provides the option to specify additional details for a specific offer within a large catalog of products that are represented by a single listing in the Microsoft Store, including the product name to display to the user during the purchase.

Important

This method must be called on the UI thread.

Applies to

See also