Share via


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();
public static GazeInputSourcePreview GetForCurrentView();
function getForCurrentView()
Public Shared Function GetForCurrentView () As GazeInputSourcePreview

Returns

A GazeInputSourcePreview object bound to the active application.

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.

Applies to

See also