Share via


Adaptive UI-WPF C# Sample

Kinect for Windows 1.8

Overview

The Kinect for Windows SDK enables your app to adapt its UI based on the user's field of view and distance from the screen. Using Kinect, your app can attract a user's attention, guide them to transition between interaction zones at the right times, and provide the correct UI in the correct place for each user.

Note

To work properly when the user is at close distance to the Kinect sensor, this sample requires a model of the Kinect sensor that supports near mode.

When you run this sample, you see the following:

  • Adaptive UI settings — To use the Adaptive UI sample correctly, some calibration is required to enable your app to calculate the optimal UI based on the user and the environment.
  • Interaction zone viewer — An overhead representation showing the interaction ranges and the engagement area. The viewer tracks users as colored circles matching their current position.
  • User-based sample UI — Different UI is displayed for a user that is in the near range, far range, or out of range zones. The UI is sized and positioned based on physical characteristics of the user and allows interactions appropriate for the current range.
  • Optimal UI placement preview — A bounding box that moves and scales with the user to visualize the recommended optimal location for UI placement.

Notes

Adaptive UI is most useful with large-screen displays where a user might not be able to see or reach everything on screen, and where placement of UI at an appropriate height is important.

Accuracy when configuring the settings to correctly match the physical characteristics of the screen and sensor can have a noticeable impact on the end user experience.

This sample assumes that the x-axis of both the display and the Kinect sensor are parallel and that the display surface is vertical.

The UI that is shown when a user crosses the near or far boundaries is sized based on the user's field of view at those distances. If the boundary is far enough away, the user's field of view can be larger than the physical size of the screen. As a result, the UI can also appear larger than the screen in this case. This sample is meant as a general demonstration. You should account for the intended usage of your app and design your UI to fit within the appropriate display area.

To run a sample you must have the Kinect for Windows SDK installed. To compile a sample, you must have the developer toolkit installed. The latest SDK and developer toolkit are available on the developer download page. If you need help installing the toolkit, look on this page: To Install the SDK and Toolkit. The toolkit includes a sample browser, which you can use to launch a sample or download it to your machine. To open the sample browser, click Start > All Programs > Kinect for Windows SDK [version number] > Developer Toolkit Browser.

If you need help loading a sample in Visual Studio or using Visual Studio to compile, run, or debug, see Opening, Building, and Running Samples in Visual Studio.