DesktopWindowXamlSource.TakeFocusRequested DesktopWindowXamlSource.TakeFocusRequested DesktopWindowXamlSource.TakeFocusRequested DesktopWindowXamlSource.TakeFocusRequested Event

Definition

Occurs when the host desktop application receives a request take back focus from the DesktopWindowXamlSource object (for example, the user is on the last focusable element in the DesktopWindowXamlSource and presses Tab).

public : event TypedEventHandler<DesktopWindowXamlSource, DesktopWindowXamlSourceTakeFocusRequestedEventArgs> TakeFocusRequested
// Register
event_token TakeFocusRequested(TypedEventHandler<DesktopWindowXamlSource, DesktopWindowXamlSourceTakeFocusRequestedEventArgs> const& handler) const;

// Revoke with event_token
void TakeFocusRequested(event_token const& cookie) const;

// Revoke with event_revoker
TakeFocusRequested_revoker TakeFocusRequested(auto_revoke_t, TypedEventHandler<DesktopWindowXamlSource, DesktopWindowXamlSourceTakeFocusRequestedEventArgs> const& handler) const;
public event TypedEventHandler<DesktopWindowXamlSource, DesktopWindowXamlSourceTakeFocusRequestedEventArgs> TakeFocusRequested
Public Event TakeFocusRequested As TypedEventHandler (Of DesktopWindowXamlSource, DesktopWindowXamlSourceTakeFocusRequestedEventArgs)

Remarks

When you add a DesktopWindowXamlSource to your desktop application, by default the DesktopWindowXamlSource does not automatically handle focus navigation via keyboard events such as the Tab or arrow keys. Handle this event to programmatically give focus to the next focusable element in the host application when the user navigates away from the DesktopWindowXamlSource.