StoreContext.FindStoreProductForPackageAsync(IIterable<String>, Package) StoreContext.FindStoreProductForPackageAsync(IIterable<String>, Package) StoreContext.FindStoreProductForPackageAsync(IIterable<String>, Package) StoreContext.FindStoreProductForPackageAsync(IIterable<String>, Package) StoreContext.FindStoreProductForPackageAsync(IIterable<String>, Package) Method

Definition

Gets Store product details for the app or add-on that is associated with the specified package.

public : IAsyncOperation<StoreProductResult> FindStoreProductForPackageAsync(IIterable<Platform::String> productKinds, Package package)
IAsyncOperation<StoreProductResult> FindStoreProductForPackageAsync(IIterable<winrt::hstring> productKinds, Package package) const;
public IAsyncOperation<StoreProductResult> FindStoreProductForPackageAsync(IEnumerable<String> productKinds, Package package)
Public Function FindStoreProductForPackageAsync(productKinds As IEnumerable(Of String), package As Package) As IAsyncOperation(Of StoreProductResult)
Windows.Services.Store.StoreContext.findStoreProductForPackageAsync(productKinds, package).done( /* Your success and error handlers */ );

Parameters

productKinds
IEnumerable<String> IEnumerable<String> IEnumerable<String>

An array of strings that specify the types of Store products that might be associated with the package. For a list of the supported string values, see the ProductKind property.

package
Package Package Package

A Package that represents the package for which you want to get the corresponding Store product details.

Returns

An asynchronous operation that, on successful completion, returns a StoreProductResult object. Use the Product property of this object to access a StoreProduct that contains Store product details for the specified package.

Additional features and requirements

Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Services.Store.StoreContract (introduced v2)

Remarks

Use this method to get Store product details (such as the Store ID) for a package that is associated with the current app or an add-on for the current app. This method may return errors if the package is not associated with the current app, the current device is offline, or if the current app was not installed from the Store (for example, if the app was sideloaded). In these cases, you can examine the ExtendedError property of the StoreProductResult return object to get more details about the error.

See also