StoreContext.DownloadAndInstallStorePackagesAsync(IIterable<String>) StoreContext.DownloadAndInstallStorePackagesAsync(IIterable<String>) StoreContext.DownloadAndInstallStorePackagesAsync(IIterable<String>) StoreContext.DownloadAndInstallStorePackagesAsync(IIterable<String>) StoreContext.DownloadAndInstallStorePackagesAsync(IIterable<String>) Method

Definition

Downloads and installs the specified downloadable content (DLC) packages for the current app from the Microsoft Store without displaying a notification UI dialog to the user.

public : IAsyncOperationWithProgress<StorePackageUpdateResult, StorePackageUpdateStatus> DownloadAndInstallStorePackagesAsync(IIterable<Platform::String> storeIds)
IAsyncOperationWithProgress<StorePackageUpdateResult, StorePackageUpdateStatus> DownloadAndInstallStorePackagesAsync(IIterable<winrt::hstring> storeIds) const;
public IAsyncOperationWithProgress<StorePackageUpdateResult, StorePackageUpdateStatus> DownloadAndInstallStorePackagesAsync(IEnumerable<String> storeIds)
Public Function DownloadAndInstallStorePackagesAsync(storeIds As IEnumerable(Of String)) As IAsyncOperationWithProgress(Of StorePackageUpdateResultStorePackageUpdateStatus)
Windows.Services.Store.StoreContext.downloadAndInstallStorePackagesAsync(storeIds).done( /* Your success and error handlers */ );

Parameters

storeIds
IEnumerable<String> IEnumerable<String> IEnumerable<String>

The Store IDs of the add-ons that correspond to the DLC packages to install for the current app.

Returns

An object that the caller can observe to track progress and completion for the operation. On successful completion, the result is a StorePackageUpdateResult object that provides info about the package updates.

Additional features and requirements

Device family
Windows 10, version 1809 (introduced v10.0.17763.0)
API contract
Windows.Services.Store.StoreContract (introduced v4)
Capabilities
storePackageManagement

Remarks

Use this method to download and install new DLC packages for the current app. When you call this method, the OS silently downloads and installs the packages without displaying a notification dialog. This method requires the restricted storePackageManagement capability to perform this operation. If you don't have access to this restricted capability, you can use the RequestDownloadAndInstallStorePackagesAsync methods instead (these methods display a notification dialog that requests the user's permission to install the package).

Note

DLC packages are not available to all developer accounts.

Note

The restricted storePackageManagement capability is only available to desktop applications and games that use the Desktop Bridge and to Xbox games that use XVC packages and are developed as part of a managed partner program, such as the ID@Xbox program. These applications and games have this capability by default.

The Store ID for an add-on is available in Partner Center, and it also is returned by the StoreId property of the StoreProduct that represents the DLC add-on. For more information, see Store IDs.

This operation will not block. The IAsyncOperationWithProgress object returned by this method will complete after the packages are downloaded and installed.

The method that you assign to handle Progress notifications is called one time for each step in the download and installation process for each package in this request. The Progress handler receives a StorePackageUpdateStatus argument that provides info about the package that raised the progress notification.

See also