Udostępnij za pośrednictwem


Control.IsFocusEngagementEnabled Property

Definition

Get or sets a value that indicates whether focus can be constrained to the control when the user presses the A/Select button on a game controller.

public:
 property bool IsFocusEngagementEnabled { bool get(); void set(bool value); };
bool IsFocusEngagementEnabled();

void IsFocusEngagementEnabled(bool value);
public bool IsFocusEngagementEnabled { get; set; }
var boolean = control.isFocusEngagementEnabled;
control.isFocusEngagementEnabled = boolean;
Public Property IsFocusEngagementEnabled As Boolean
<control IsFocusEngagementEnabled="bool"/>

Property Value

Boolean

bool

true if focus can be constrained within the control boundaries; otherwise, false.

Remarks

IsFocusEngagementEnabled must be true and the control must have focus before you set the IsFocusEngaged property to true. Otherwise, a runtime exception will occur.

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