GazeInputSourcePreview.GetForCurrentView GazeInputSourcePreview.GetForCurrentView GazeInputSourcePreview.GetForCurrentView GazeInputSourcePreview.GetForCurrentView GazeInputSourcePreview.GetForCurrentView Method

Definition

Retrieves a reference to the user identified by an eye-tracking device, bound to the active application.

public : static GazeInputSourcePreview GetForCurrentView()
static GazeInputSourcePreview GetForCurrentView() const;
public static GazeInputSourcePreview GetForCurrentView()
Public Shared Function GetForCurrentView() As GazeInputSourcePreview
var gazeInputSourcePreview = Windows.Devices.Input.Preview.GazeInputSourcePreview.getForCurrentView();

Returns

Remarks

This method must be called on the UI thread, see Keep the UI thread responsive.

Calling this method results in a privacy prompt in which the user is asked to grant permission for your app to access their eye-tracking device. The user is prompted only once, when the app is run for the first time.

Windows automatically prompts users with a consent dialog (when the app is first run), with which the user must grant permission for the app to communicate with the eye-tracking device and access gaze data.

See also