PackageCatalog.PackageUninstalling 事件
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指示正在卸载应用包。
// Register
event_token PackageUninstalling(TypedEventHandler<PackageCatalog, PackageUninstallingEventArgs const&> const& handler) const;
// Revoke with event_token
void PackageUninstalling(event_token const* cookie) const;
// Revoke with event_revoker
PackageCatalog::PackageUninstalling_revoker PackageUninstalling(auto_revoke_t, TypedEventHandler<PackageCatalog, PackageUninstallingEventArgs const&> const& handler) const;
public event TypedEventHandler<PackageCatalog,PackageUninstallingEventArgs> PackageUninstalling;
function onPackageUninstalling(eventArgs) { /* Your code */ }
packageCatalog.addEventListener("packageuninstalling", onPackageUninstalling);
packageCatalog.removeEventListener("packageuninstalling", onPackageUninstalling);
- or -
packageCatalog.onpackageuninstalling = onPackageUninstalling;
Public Custom Event PackageUninstalling As TypedEventHandler(Of PackageCatalog, PackageUninstallingEventArgs)
事件类型
注解
如果使用 OpenForCurrentPackage 获取 PackageCatalog,则应用仅接收其自身或其相关包(如可选包)的包事件。
若要获取用户所有包的包事件,请改用 OpenForCurrentUser 获取 PackageCatalog。