Skip to content

Latest commit

 

History

History
30 lines (18 loc) · 2.21 KB

packageextensioncatalog_packageupdating.md

File metadata and controls

30 lines (18 loc) · 2.21 KB
-api-id -api-type
E:Windows.ApplicationModel.PackageExtensions.PackageExtensionCatalog.PackageUpdating
winrt event

Windows.ApplicationModel.PackageExtensions.PackageExtensionCatalog.PackageUpdating

-description

Event that is fired when an extension package is being updated.

-remarks

This event marks when a package update has started. It precedes the PackageUpdated event. In most cases, treat this as you do PackageUninstalling.

A good way to handle this event is to treat the associated extensions within the package as unavailable when you handle PackageUpdating, and then reload them when you handle the PackageUpdated event. The time between these two events is typically less than a second.

The event arguments, PackageExtensionPackageUpdatingEventArgs, only include the Package and the PackageExtensionName specified in the extension's Package.appxmanifest file as <uap17:PackageExtension Name=...>. It doesn't contain the list of extensions.

When you handle the PackageUpdating event, match the package that is being updated against any extensions that you have loaded from that package so that you can keep track of which extensions are now available. This is why you should keep track of the PackageExtensions that you have loaded, the packages to which they belong, and a unique identifier for them that you can use as a key as described in the remarks for PackageExtensionCatalog.Open.

-see-also

PackageExtension, PackageExtensionCatalog.Open, PackageExtensionPackageUpdatingEventArgs, PackageUpdated, PackageUninstalling

-examples