共用方式為


PackageCatalog.PackageStatusChanged 事件

定義

指出應用程式套件已移除或更新

// Register
event_token PackageStatusChanged(TypedEventHandler<PackageCatalog, PackageStatusChangedEventArgs const&> const& handler) const;

// Revoke with event_token
void PackageStatusChanged(event_token const* cookie) const;

// Revoke with event_revoker
PackageCatalog::PackageStatusChanged_revoker PackageStatusChanged(auto_revoke_t, TypedEventHandler<PackageCatalog, PackageStatusChangedEventArgs const&> const& handler) const;
public event TypedEventHandler<PackageCatalog,PackageStatusChangedEventArgs> PackageStatusChanged;
function onPackageStatusChanged(eventArgs) { /* Your code */ }
packageCatalog.addEventListener("packagestatuschanged", onPackageStatusChanged);
packageCatalog.removeEventListener("packagestatuschanged", onPackageStatusChanged);
- or -
packageCatalog.onpackagestatuschanged = onPackageStatusChanged;
Public Custom Event PackageStatusChanged As TypedEventHandler(Of PackageCatalog, PackageStatusChangedEventArgs) 

事件類型

備註

如果使用 OpenForCurrentPackage取得 PackageCatalog,應用程式只會接收本身或其相關套件的套件事件,例如選擇性套件。

若要取得所有使用者套件的套件事件,請改用 OpenForCurrentUser 取得 PackageCatalog。

適用於