Control.FocusDisengaged Event

Definition

Occurs as focus is released from the control when the user presses the B/Back button on a game controller.

// Register
event_token FocusDisengaged(TypedEventHandler<Control, FocusDisengagedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
Control::FocusDisengaged_revoker FocusDisengaged(auto_revoke_t, TypedEventHandler<Control, FocusDisengagedEventArgs const&> const& handler) const;
public event TypedEventHandler<Control,FocusDisengagedEventArgs> FocusDisengaged;
function onFocusDisengaged(eventArgs) { /* Your code */ }
control.addEventListener("focusdisengaged", onFocusDisengaged);
control.removeEventListener("focusdisengaged", onFocusDisengaged);
- or -
control.onfocusdisengaged = onFocusDisengaged;
Public Custom Event FocusDisengaged As TypedEventHandler(Of Control, FocusDisengagedEventArgs) 
<control FocusDisengaged="eventhandler"/>

Event Type

Remarks

When the IsFocusEngagementEnabled property is set to true, it marks the control as requiring focus engagement. This means that the user must press the A/Select button to "engage" the control and interact with it. When they are finished, they can press the B/Back button to disengage the control and navigate away from it.

Focus engagement makes it easier to use a game controller to interact with an app. Setting focus engagement does not affect keyboard or other input devices. For more info, see Focus engagement.

Applies to

See also