PackageExtensionCatalog.PackageUpdated Event
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.
Event that is fired when an extension package in the catalog is updated.
// Register
event_token PackageUpdated(TypedEventHandler<PackageExtensionCatalog, PackageExtensionPackageUpdatedEventArgs const&> const& handler) const;
// Revoke with event_token
void PackageUpdated(event_token const* cookie) const;
// Revoke with event_revoker
PackageExtensionCatalog::PackageUpdated_revoker PackageUpdated(auto_revoke_t, TypedEventHandler<PackageExtensionCatalog, PackageExtensionPackageUpdatedEventArgs const&> const& handler) const;
public event TypedEventHandler<PackageExtensionCatalog,PackageExtensionPackageUpdatedEventArgs> PackageUpdated;
function onPackageUpdated(eventArgs) { /* Your code */ }
packageExtensionCatalog.addEventListener("packageupdated", onPackageUpdated);
packageExtensionCatalog.removeEventListener("packageupdated", onPackageUpdated);
- or -
packageExtensionCatalog.onpackageupdated = onPackageUpdated;
Public Custom Event PackageUpdated As TypedEventHandler(Of PackageExtensionCatalog, PackageExtensionPackageUpdatedEventArgs)
Event Type
Remarks
The event arguments contain a list of extensions within the extension package. Extensions are scoped by the <uap17:PackageExtension Name=...>
defined in the extension's Package.appxmanifest file. Only extensions that match the <uap17:PackageExtension Name=...>
defined in the host's Package.appxmanifest file are in the list.
The updated package may include new PackageExtensions, and may no longer contain PackageExtensions that were there previously. If you are maintaining a list of loaded extensions, the handler for this event is a good place to compare the list of PackageExtensions in the new package against your list and then update your list accordingly.
PackageExtension properties may have changed during the update. If you cached any of them, this is a good time to check for updates.
Generally the best way to handle this event is to treat it as you do the PackageInstalled event, but update your tracking list of PackageExtensions instead of creating a new tracking list.