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) 

事件類型

備註

處理此事件可讓您執行清除工作,例如關閉檔案、將緩衝區排清至磁片等等。

適用於