Devices Made for Surface vs. Windows Touch Computers

Applications that are built using the Microsoft Surface SDK can run on devices made for Surface and on Windows 7 computers, with or without touch functionality. This topic describes how to create your application so that it can easily adapt to any of these environments.

Adapting Your Application to the Environment

If you want your Surface application to run on devices made for Surface as well as other hardware, program your application to adapt to the environment, not to the machine. Determine which hardware capabilities your application relies on, and then in your application, test for those capabilities, and provide a different layout or behavior depending upon what capabilities are available.

For example, the ScatterView control is an excellent choice for allowing many users to interact with content at the same time, from all four sides of a device made for Surface. However, if the device made for Surface is vertical, you might want to make the items in the ScatterView control initially appear closer to the bottom edge instead of randomly scattered all over the entire surface. Alternatively, you might want to display the content in a different control (such as a SurfaceListBox).

As another example, you might decide that you want to streamline your code by capturing only finger touches. However, in an environment where finger recognition is not supported, you would want to capture all touches. To accomplish this, you could use the IsFingerRecognitionSupported property in the PreviewTouchDown event to determine when to capture all touches.

Use the members of the Core layer InteractiveSurfaceDevice class or Presentation layer InteractiveSurfaceDevice class to determine the hardware capabilities of the environment your application is running in.

The following sections describe the differences between devices made for Surface and other possible environments.

Devices made for Surface

Devices made for Surface provide the largest number of features of the three environments, and the Surface SDK provides access to all of these features. A device made for Surface includes the following features and behaviors:

  • 50 simultaneous touches   A device made for Surface can detect up to 50 simultaneous touches.

  • Finger and blob recognition   A device made for Surface can detect if a touch is a finger or just a shapeless blob.

  • Tagged objects   A device made for Surface can detect a printed tag that is affixed to the bottom of an object placed on the screen, and can detect the value of the tag. Your application can respond to a single tag value or a range of tag values. Additionally, you can signal your application start when a tag is placed on the device, even if your application is not already running in the foreground.

  • Touch orientation   A device made for Surface can detect the orientation of any touch, whether a finger, blob, or tag.

  • Touch bounds   A device made for Surface can report the bounds of a touch.

  • Manipulations and gestures   The Surface SDK includes functionality that identifies gestures (such as a tap or hold gesture). Also, the Surface SDK inherits the functionality to respond to manipulations from the .NET Framework System.Windows.Input namespace.

  • Tilt angle   A device made for Surface can report the angle at which the device is tilted. For example, if your device is mounted vertically on a wall, the device will report a Tilt value of Vertical, and a TiltAngle value close to 90 degrees. Surface Shell responds to a vertical tilt angle by displaying only the bottom two Access Points. You can program your application to change the layout according to the tilt angle of the display.

  • Shell orientation   A device made for Surface can pass the orientation of Launcher to your application so that you display your application with the same orientation.

  • Pixel size   A device made for Surface can report the physical size of pixels. You can use the pixel size and dots-per-inch (DPI) values to make sure that user interface (UI) elements in your application will have the same physical size on any device made for Surface.

  • On-screen keyboard   The Surface on-screen keyboard appears when the user touches a SurfaceTextBox or SurfacePasswordBox control. You can also make the keyboard appear for custom controls. For more information, see On-Screen Keyboard and Numeric Keypad.

When you deploy and register your Surface application, it becomes automatically integrated with Surface Shell and appears in Launcher. When a user opens your application from Launcher in Surface Mode, it runs in full-screen mode, and the Windows UI is suppressed.

In addition to registering your application, there are other responsibilities involved with running your Surface application on a device made for Surface. For more information, see Application Requirements.

Windows 7 Touch Computers

Many interactive display devices that support multi-touch support only two or three simultaneous touches, which are sufficient to scale and rotate UI elements in your application, or trigger manipulation and gesture events. Other touch-related features depend on the hardware of your interactive display device. For example, most common touch-enabled display hardware does not report pixel size, distinguish between fingers and blobs, report touch orientation, or report a tilt angle, though it may report touch bounds.

Because Surface Shell does not run on hardware other than a device made for Surface, the tilt angle is assumed to be 90 degrees, and the value reported for the initial orientation is Bottom (in other words, upright). Additionally, when you're using a Windows 7 computer with touch functionality, the Tablet PC Keyboard appears instead of the Surface on-screen keyboard.

Windows 7 Computers Without Touch Functionality

Without touch functionality, your application relies on mouse, keyboard, and stylus input. To adapt your application to run with mouse input or stylus input as well as touch input, add mouse and stylus event handlers.

Surface applications do not respond to touch devices that use a single-touch digitizer.

Did you find this information useful? Please send us your suggestions and comments.

© Microsoft Corporation. All rights reserved.