CoreApplicationView.HostedViewClosing 事件

定义

指示托管视图正在关闭。 为托管窗口方案提供推迟托管视图拆毁的机会。

// Register
event_token HostedViewClosing(TypedEventHandler<CoreApplicationView, HostedViewClosingEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
CoreApplicationView::HostedViewClosing_revoker HostedViewClosing(auto_revoke_t, TypedEventHandler<CoreApplicationView, HostedViewClosingEventArgs const&> const& handler) const;
public event TypedEventHandler<CoreApplicationView,HostedViewClosingEventArgs> HostedViewClosing;
function onHostedViewClosing(eventArgs) { /* Your code */ }
coreApplicationView.addEventListener("hostedviewclosing", onHostedViewClosing);
coreApplicationView.removeEventListener("hostedviewclosing", onHostedViewClosing);
- or -
coreApplicationView.onhostedviewclosing = onHostedViewClosing;
Public Custom Event HostedViewClosing As TypedEventHandler(Of CoreApplicationView, HostedViewClosingEventArgs) 

事件类型

注解

处理此事件提供了执行清理任务(例如关闭文件、将缓冲区刷新到磁盘等)的机会。

适用于