共用方式為


AppExtensionCatalog.PackageUninstalling 事件

定義

卸載擴充功能套件時引發的事件。

// Register
event_token PackageUninstalling(TypedEventHandler<AppExtensionCatalog, AppExtensionPackageUninstallingEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
AppExtensionCatalog::PackageUninstalling_revoker PackageUninstalling(auto_revoke_t, TypedEventHandler<AppExtensionCatalog, AppExtensionPackageUninstallingEventArgs const&> const& handler) const;
public event TypedEventHandler<AppExtensionCatalog,AppExtensionPackageUninstallingEventArgs> PackageUninstalling;
function onPackageUninstalling(eventArgs) { /* Your code */ }
appExtensionCatalog.addEventListener("packageuninstalling", onPackageUninstalling);
appExtensionCatalog.removeEventListener("packageuninstalling", onPackageUninstalling);
- or -
appExtensionCatalog.onpackageuninstalling = onPackageUninstalling;
Public Custom Event PackageUninstalling As TypedEventHandler(Of AppExtensionCatalog, AppExtensionPackageUninstallingEventArgs) 

事件類型

備註

更新您處理此事件時所追蹤的延伸模組清單,以反映已卸載的擴充功能。 如果使用者重新安裝套件,則會引發 PackageInstalled 事件,而且您可以在處理該事件時重新新增擴充功能,就像新增任何擴充功能一樣。

如同 PackageUpdating,此事件只會傳遞正在卸載的套件,而不是 AppExtensions的清單。

適用於