Surface Samples

The Microsoft Surface SDK contains several types of samples, including quick start tutorials, how-to topics, and extractable Microsoft Visual Studio 2010 projects for sample applications.

Quick Starts

The following topics are basic tutorials to help you create your first Surface application for the Presentation layer or the Core layer:

"How Do I…?" Examples

Sample Application Projects

The sample applications that come with the Surface SDK show several different programming techniques in a complete application. You can use these applications as a starting point for more complete applications or just as examples of best practices in Surface programming. For information about obtaining the sample files, see Extracting and Installing the Surface Samples.

Samples That Use the Core Layer and the XNA Framework

  • Finger Fountain draws small images for every contact at every frame. This sample emphasizes multiple touches and shows how to use the Microsoft XNA APIs.

  • Framework provides an extensive sample framework that helps you create controls by using the Core layer. The code in this sample eliminates inconsistent behavior among Core-based applications by using the Model-View-Controller (MVC) design pattern.

  • Cloth is an XNA-based application that demonstrates how to use the Core Interaction Framework.

  • RawImage Visualizer shows how to use the RawImage APIs for XNA applications. This sample displays captured normalized (8 bit per pixel) images that are flipped vertically.

  • XNA Scatter demonstrates how to use the manipulations and inertia APIs to move graphical user interface (GUI) components around in a Surface application in a natural and intuitive way.

Samples That Use the Presentation Layer (WPF)

  • Controls Box shows how to build simple application behaviors from touch-enabled controls that the Presentation layer provides, such as updating a text box when a user touches a button.

  • Data Visualizer shows contact properties that are exposed in the Presentation layer (such as x, y, height, width, major axis, minor axis, and orientation) and how you can read and use these properties in a Surface application.

  • Grand Piano demonstrates how to integrate sound into Surface applications based on the Presentation layer.

  • Item Compare represents a simple tool that lets a user compare and contrast the properties of two "items" (tagged objects).

  • Photo Paint uses the SurfaceInkCanvas control to implement drawing and painting over pictures and video.

  • ScatterPuzzle shows an implementation of the ScatterView and SurfaceListBox controls to create a simple puzzle game. The ScatterView and SurfaceListBox controls automatically provide some powerful features related to Surface.

  • Shopping Cart shows how to implement drag-and-drop functionality in a retail application.

  • Tag Visualizer Events shows how to incorporate hit-testing in the TagVisualizer control to let user interface (UI) elements react when tagged objects move over them.

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

© Microsoft Corporation. All rights reserved.