Jaa


Control.RequiresPointer Property

Definition

Gets or sets whether a UI element supports mouse mode, which emulates pointer interaction experiences with non-pointer input devices such as an game pad or remote control.

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

void RequiresPointer(RequiresPointer value);
public RequiresPointer RequiresPointer { get; set; }
var requiresPointer = control.requiresPointer;
control.requiresPointer = requiresPointer;
Public Property RequiresPointer As RequiresPointer
<control RequiresPointer="requiresPointerMemberName"/>

Property Value

The pointer emulation mode. The default is Never.

Windows requirements

Device family
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v3.0)

Remarks

For non-pointer input devices, focus is moved between controls through a variety of methods, such as the Tab and arrow keys on a keyboard, the directional pad (D-pad) on a remote, or thumb sticks on a game controller. For some user experiences, such as maps and drawing surfaces, it is not possible or practical to use XY focus navigation. RequiresPointer enables an app to provide a more pointer-like interaction experience through a cursor that can be moved freely using game input devices.

RequiresPointer is supported only on the Xbox device family, and only when using a game pad or remote control. The property is ignored otherwise.

RequiresPointerMode sets mouse mode at the application level.

For more info, see the Mouse mode section of Designing for Xbox and TV.

Version compatibility

The RequiresPointer property is not available prior to Windows 10, version 1607. If your app’s 'minimum platform version' setting in Microsoft Visual Studio is less than the 'introduced version' shown in the Requirements block later in this page, you must design and test your app to account for this. For more info, see Version adaptive code.

To avoid exceptions when your app runs on previous versions of Windows 10, do not set this property in XAML or use it without performing a runtime check. This example shows how to use the ApiInformation class to check for the presence of this property before you set it.

if (ApiInformation.IsPropertyPresent("Windows.UI.Xaml.Controls.Control", "RequiresPointer"))
{
    mapControl1.RequiresPointer = RequiresPointer.WhenEngaged;
}

Applies to

See also