AppExtensionCatalog.PackageUpdated AppExtensionCatalog.PackageUpdated AppExtensionCatalog.PackageUpdated AppExtensionCatalog.PackageUpdated AppExtensionCatalog.PackageUpdated Event

Definition

Event that is fired when an extension package in the catalog is updated.

public : event TypedEventHandler<AppExtensionCatalog, AppExtensionPackageUpdatedEventArgs> PackageUpdated
// Register
event_token PackageUpdated(TypedEventHandler<AppExtensionCatalog, AppExtensionPackageUpdatedEventArgs> const& handler) const;

// Revoke with event_token
void PackageUpdated(event_token const& cookie) const;

// Revoke with event_revoker
PackageUpdated_revoker PackageUpdated(auto_revoke_t, TypedEventHandler<AppExtensionCatalog, AppExtensionPackageUpdatedEventArgs> const& handler) const;
public event TypedEventHandler<AppExtensionCatalog, AppExtensionPackageUpdatedEventArgs> PackageUpdated
Public Event PackageUpdated As TypedEventHandler (Of AppExtensionCatalog, AppExtensionPackageUpdatedEventArgs)
function onPackageUpdated(eventArgs){/* Your code */}


appExtensionCatalog.addEventListener("packageupdated", onPackageUpdated);
appExtensionCatalog.removeEventListener("packageupdated", onPackageUpdated);

Remarks

The event arguments contain a list of extensions within the extension package. Extensions are scoped by the <uap3:AppExtension Name=...> defined in the extension's Package.appxmanifest file. Only extensions that match the <uap3:AppExtension Name=...> defined in the host's Package.appxmanifest file are in the list.

The updated package may include new AppExtensions, and may no longer contain AppExtensions 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 AppExtensions in the new package against your list and then update your list accordingly.

AppExtension 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 AppExtensions instead of creating a new tracking list.