Share via


WindowTabManager.TabSwitchRequested Event

Definition

Occurs when a tab is switched to from a system shell surface.

// Register
event_token TabSwitchRequested(TypedEventHandler<WindowTabManager, WindowTabSwitchRequestedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
WindowTabManager::TabSwitchRequested_revoker TabSwitchRequested(auto_revoke_t, TypedEventHandler<WindowTabManager, WindowTabSwitchRequestedEventArgs const&> const& handler) const;
public event TypedEventHandler<WindowTabManager,WindowTabSwitchRequestedEventArgs> TabSwitchRequested;
function onTabSwitchRequested(eventArgs) { /* Your code */ }
windowTabManager.addEventListener("tabswitchrequested", onTabSwitchRequested);
windowTabManager.removeEventListener("tabswitchrequested", onTabSwitchRequested);
- or -
windowTabManager.ontabswitchrequested = onTabSwitchRequested;
Public Custom Event TabSwitchRequested As TypedEventHandler(Of WindowTabManager, WindowTabSwitchRequestedEventArgs) 

Event Type

Remarks

Important

This API is for Win32 desktop apps only. UWP and other app types are not supported.

Handle this event to make the tab that has been switched to the active tab in your app.

Applies to