共用方式為


WindowTabManager.TabCloseRequested 事件

定義

從系統殼層介面關閉索引標籤時發生。

// Register
event_token TabCloseRequested(TypedEventHandler<WindowTabManager, WindowTabCloseRequestedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
WindowTabManager::TabCloseRequested_revoker TabCloseRequested(auto_revoke_t, TypedEventHandler<WindowTabManager, WindowTabCloseRequestedEventArgs const&> const& handler) const;
public event TypedEventHandler<WindowTabManager,WindowTabCloseRequestedEventArgs> TabCloseRequested;
function onTabCloseRequested(eventArgs) { /* Your code */ }
windowTabManager.addEventListener("tabcloserequested", onTabCloseRequested);
windowTabManager.removeEventListener("tabcloserequested", onTabCloseRequested);
- or -
windowTabManager.ontabcloserequested = onTabCloseRequested;
Public Custom Event TabCloseRequested As TypedEventHandler(Of WindowTabManager, WindowTabCloseRequestedEventArgs) 

事件類型

備註

重要

此 API 僅適用于 Win32 傳統型應用程式。 不支援 UWP 和其他應用程式類型。

處理此事件以關閉應用程式中的索引標籤。

適用於