On the 12th of July 2011 Microsoft released the Surface 2.0 SDK.
The SDK simply makes it easy to create engaging experiences, using multitouch and object interaction, for the next generation device for Microsoft Surface – the Samsung SUR40 for Microsoft Surface.
The Surface 2.0 SDK replaces the Microsoft Surface Toolkit for Windows Touch Beta that was released last year.
Download the SDK and find training, documentation, and guidance on the new Surface development center at www.msdn.com/windows/surface/
Overview
The Microsoft® Surface® 2.0 SDK is a set of controls, APIs, templates, tools, sample applications, and documentation for application developers. Using the familiar .NET Framework 4.0, Windows Presentation Framework 4.0 (WPF) or XNA framework 4.0, and the Surface 2.0 SDK, developers can quickly and consistently create innovative applications that take advantage of the new PixelSense™ technology delivered in the Surface 2.0 platform.
The next generation Surface device, the Samsung SUR40 for Microsoft Surface, was announced in January 2011 and will be available to commercial customers in 23 countries later this year. For more information on the Samsung SUR40 for Microsoft Surface, visit www.surface.com.
System Requirements
The Surface 2.0 SDK runs on the Samsung SUR40 for Microsoft Surface or a PC with a 32-bit or 64-bit edition of one of the following Windows® 7 operating systems:
Windows 7 Home Premium
Windows 7 Professional
Windows 7 Ultimate
Additional Requirements:
The Surface SDK supports input devices such as mouse, touch, and tagged objects. With the Surface SDK, you can develop an application that supports various types of input. However, to test your application in a touch-enabled environment, your computer must have a touch-screen digitizer.
SDK Contents
The Surface SDK contains the following resources:
Resource
Description
Reference assemblies
These assemblies provide the classes that are necessary to create a touch-enabled application.
Visual Studio project and item templates
These templates enable you to quickly create a touch-enabled application. When you create a project by selecting the Surface template, all of the necessary references and resources are automatically included as part of your project.
Tools
The input simulator, input visualizer, and Surface stress tools help you develop and test applications for the Samsung SUR40 for Microsoft Surface and Windows 7 touch-enabled PCs. With the Surface Input Simulator tool, you can simulate different inputs, hardware capabilities, and tilt of the device.
Sample applications
Sample applications are fully functional applications that you can build and run. These applications showcase various features of the Surface environment. You can run these applications to see Surface functionality in action, and examine the source code to see how certain tasks are performed.
Documentation
The documentation for the Surface SDK includes short examples of how to perform various programming tasks, longer and more detailed examination into various programming scenarios, and a detailed API reference.
Note: When you are ready to distribute an application that you have created with the Surface SDK, download the Microsoft® Surface® 2.0 Runtime from MSDN and include it with your installation package. The Surface SDK Runtime contains the reference assemblies that are required to run your application.
There are two types of APIs; presentation API and core APIs. The Presentation APIs use Microsoft Windows Presentation Foundation (WPF), which is the standard choice for developing touch-enabled applications. The cores APIs are .NET platform agnostic APIs that enable querying a raw image directly and registering for touch events. Learn more about the core API at http://msdn.microsoft.com/en-us/library/ff727894(v=Surface.20).aspx.
Your touch-enabled application will usually contain one or more Surface controls. Some of these controls are specialized counterparts to WPF controls, and others enable you to include functionality in your application in ways that have no WPF counterpart. The following table summarizes the controls that are included in the Microsoft Surface SDK for Windows Touch Beta.
Control
LibraryBar
The LibraryBar control enables you to list items horizontally, group items into several groups, and scroll groups. By default, the LibraryBar control supports drag-and-drop operations.
LibraryContainer
The LibraryContainer control is a dual-view control that arranges items in a horizontal bar or in a vertical stack and enables you to switch back and forth between the two views.
LibraryStack
The LibraryStack control enables you to display items that are stacked on each other. Users can view the individual items by rearranging the order of the stack or by removing items from the stack. By default, the LibraryStack control supports drag-and-drop operations.
ScatterView
The ScatterView control is a container for any other User Interface (UI) element. When you place a UI element inside of a ScatterView control, that element automatically gains the ability to be moved, rotated, and resized using one or multiple touches.
ElementMenu
The ElementMenu control implements a collection of items in a tree hierarchy that users can select.
SurfaceButton
The SurfaceButton control is a specialized version of the WPF Button control. SurfaceButton provides a different default look-and-feel, adds support for Touch Visualizations, and customizes the handling of input device events so that if multiple touches are targeting the control, the Click event is raised only after all touches are lifted.
SurfaceCheckBox
The SurfaceCheckBox control is a specialized version of the WPF CheckBox control. SurfaceCheckBox provides a different default look-and-feel, adds support for Touch Visualizations, and customizes the handling of input device events so that if multiple touches are targeting the control, the Click event is raised only after all touches are lifted.
SurfaceTextBox
The SurfaceTextBox control provides an unconstrained data entry field. The SurfaceTextBox control also provides the on-screen keyboard so that you do not have to specifically invoke the keyboard.
SurfaceInkCanvas
The SurfaceInkCanvas control provides a drawing canvas that you can use with touch input to create, modify, and delete drawing strokes.
SurfaceListBox
The SurfaceListBox control is a specialized version of the WPF ListBox control. SurfaceListBox adds support for panning, the ability to move the content by direct contact with the content itself, instead of using a scroll bar.
SurfaceRadioButton
The SurfaceRadioButton control is a specialized version of the WPF RadioButton control. SurfaceRadioButton provides a different default look-and-feel, adds support for Touch Visualizations, and customizes the handling of input device events so that if multiple touches are targeting the control, the Click event is raised only after all touches are lifted.
SurfaceScrollViewer
The SurfaceScrollViewer control is a specialized version of the WPF ScrollViewer control. SurfaceScrollViewer adds support for panning, the ability to move the content by direct contact with the content itself, instead of using a scroll bar.
SurfaceSlider
The SurfaceSlider control is a specialized version of the WPF Slider control. SurfaceSlider provides a different default look-and-feel, and adds support for Touch Visualizations.
SurfaceWindow
The SurfaceWindow control is a specialized version of the WPF Window control. SurfaceWindow provides and activates the necessary event handlers to make sure that it receives touch events.
Samples that use the Core layer and XNA Framework
Sample
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
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.