PackageCatalog PackageCatalog PackageCatalog Class

Definition

Provides access to appx packages on the device.

public sealed class PackageCatalog : IPackageCatalog, IPackageCatalog2public sealed class PackageCatalog : IPackageCatalog, IPackageCatalog2Public NotInheritable Class PackageCatalog Implements IPackageCatalog, IPackageCatalog2
Attributes
Windows 10 requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Methods

AddOptionalPackageAsync(String) AddOptionalPackageAsync(String) AddOptionalPackageAsync(String)

Adds an optional package to the package catalog.

public IAsyncOperation<PackageCatalogAddOptionalPackageResult> AddOptionalPackageAsync(String optionalPackageFamilyName)public IAsyncOperation<PackageCatalogAddOptionalPackageResult> AddOptionalPackageAsync(String optionalPackageFamilyName)Public Function AddOptionalPackageAsync(optionalPackageFamilyName As String) As IAsyncOperation( Of PackageCatalogAddOptionalPackageResult )
Parameters
optionalPackageFamilyName
System.String System.String System.String

The package family of the optional package to add to the catalog.

Returns

The result of adding the package.

Attributes

Remarks

This method only works for optional packages in a related set.

OpenForCurrentPackage() OpenForCurrentPackage() OpenForCurrentPackage()

Opens the catalog of packages for the main package.

public static PackageCatalog OpenForCurrentPackage()public static PackageCatalog OpenForCurrentPackage()Public Static Function OpenForCurrentPackage() As PackageCatalog
Returns

The package catalog for the main package.

Attributes

Remarks

Use Package.Dependencies to get the list of optional packages.

OpenForCurrentUser() OpenForCurrentUser() OpenForCurrentUser()

Opens the catalog of appx packages on the device that are available to the current user.

public static PackageCatalog OpenForCurrentUser()public static PackageCatalog OpenForCurrentUser()Public Static Function OpenForCurrentUser() As PackageCatalog
Returns

The catalog of packages for the current user.

Attributes
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)
Capabilities
packageQuery

Events

PackageContentGroupStaging PackageContentGroupStaging PackageContentGroupStaging

The event that is fired when a package content group starts staging.

public event TypedEventHandler PackageContentGroupStagingpublic event TypedEventHandler PackageContentGroupStagingPublic Event PackageContentGroupStaging
Attributes

PackageInstalling PackageInstalling PackageInstalling

Indicates that an optional appx package is installing.

public event TypedEventHandler PackageInstallingpublic event TypedEventHandler PackageInstallingPublic Event PackageInstalling
Attributes

Remarks

Apps only receive package events for their optional packages.

PackageStaging PackageStaging PackageStaging

Indicates that an optional appx package is staging.

public event TypedEventHandler PackageStagingpublic event TypedEventHandler PackageStagingPublic Event PackageStaging
Attributes

Remarks

An appx package is staged when it is added to the device but is not yet registered.

Apps only receive package events for their optional packages.

PackageStatusChanged PackageStatusChanged PackageStatusChanged

Indicates that an optional package has been removed or updated

public event TypedEventHandler PackageStatusChangedpublic event TypedEventHandler PackageStatusChangedPublic Event PackageStatusChanged
Attributes

Remarks

Apps only receive package events for their optional packages.

PackageUninstalling PackageUninstalling PackageUninstalling

Indicates that an optional appx package is uninstalling.

public event TypedEventHandler PackageUninstallingpublic event TypedEventHandler PackageUninstallingPublic Event PackageUninstalling
Attributes

Remarks

Apps only receive package events for their optional packages.

PackageUpdating PackageUpdating PackageUpdating

Indicates that an optional appx package is being updated.

public event TypedEventHandler PackageUpdatingpublic event TypedEventHandler PackageUpdatingPublic Event PackageUpdating
Attributes

Remarks

Apps only receive package events for their optional packages.