StoreContext.RequestUninstallStorePackageByStoreIdAsync(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Attempts to uninstall the specified downloadable content (DLC) package for the current app. This method also displays a UI dialog that requests permission for the operation.
public:
virtual IAsyncOperation<StoreUninstallStorePackageResult ^> ^ RequestUninstallStorePackageByStoreIdAsync(Platform::String ^ storeId) = RequestUninstallStorePackageByStoreIdAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<StoreUninstallStorePackageResult> RequestUninstallStorePackageByStoreIdAsync(winrt::hstring const& storeId);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<StoreUninstallStorePackageResult> RequestUninstallStorePackageByStoreIdAsync(string storeId);
function requestUninstallStorePackageByStoreIdAsync(storeId)
Public Function RequestUninstallStorePackageByStoreIdAsync (storeId As String) As IAsyncOperation(Of StoreUninstallStorePackageResult)
Parameters
- storeId
-
String
Platform::String
winrt::hstring
The Store ID of the add-on that corresponds to the downloadable content (DLC) package to uninstall for the current app.
Returns
An asynchronous operation that, on successful completion, returns a StoreUninstallStorePackageResult object that provides info about the uninstall operation.
- Attributes
Windows requirements
Device family |
Windows 10, version 1803 (introduced in 10.0.17134.0)
|
API contract |
Windows.Services.Store.StoreContract (introduced in v3.0)
|
Remarks
You can use this method to free up disk space by uninstalling DLC packages that are no longer needed. For example, a game that offers both a single player campaign and a multiplayer campaign might use this method to uninstall the single player campaign at the user's request, after the user has completed that campaign.
When you call this method, the OS displays a dialog that asks the user's permission to uninstall the app package. To silently uninstall an app package without displaying a notification dialog, use UninstallStorePackageAsync or UninstallStorePackageByStoreIdAsync (these methods require access to a restricted capability).
The Store ID for a an add-on is available in Partner Center, and it also is returned by the StoreId property of the StoreProduct that represents the add-on. For more information, see Store IDs.
Note
DLC packages are not available to all developer accounts.