One of my favorite features of the new Microsoft Surface 2 SDK being released this summer is the new Microsoft Surface Input Simulator, because it enables me to write Surface applications on any Windows 7 machine. That means I don’t have to be in the office next to the Surface unit, I can enjoy creating Surface applications even while I am on a plane using my laptop – even if my laptop is not touch enabled.

The Simulator allows you to do a few things:

 

Simulate different types of input
You can simulate fingers, tags and blobs on your monitor.  You control whether a given input device is down by holding down your left mouse button.

You can also stamp input devices. For instance, if you want to resize a ScatterViewItem, all you would need to do stamp one finger (right click while the finger is down), and then move a second finger  to cause the resizing, as shown in the figure below.

 

The pictures below show how you can simulate blobs of different sizes and tags.

Simulate the tilt of the Surface device

Samsung SUR 40 for Microsoft Surface can be placed both vertically and horizontally. Thanks to a sensor on the device, we can detect the tilt of the hardware. When you write applications, you should take the tilt angle of the device into consideration. For instance, if the tilt of the device is 0 degrees (a horizontal deployment) you want to allow for usage of your application from any side of the surface. Such layout may not make sense if the device is tilted 90 degrees (a vertical deployment).  Either way, you don’t need to write two different binaries as you can dynamically query the tilt of the device before you layout the UI.

Code example of how you would query the tilt of the device:

            if (InteractiveSurface.PrimarySurfaceDevice.Tilt == Tilt.Horizontal)

            {

                // layout using 360 degree UI

            }

            else

            {

                // Orient all items in the same direction

            }

 

If you want to test the functionality of your application, all you need to do is move the tilt control to the desired angle. (No need to be moving the actual physical unit during development).

 

 

Simulate hardware capabilities

As the Microsoft Surface 2 SDK will allow you to write applications that target both Microsoft Surface Hardware and Windows Touch Enabled PCs, we also provided a mechanism for you to simulate different hardware capabilities. You do that by clicking on the Settings… button, and then applying any changes you make to the Hardware capabilities.

One of the cool things about our new Simulator is that it will work on any Windows 7 machine. In the past there was a minimum monitor resolution requirement of 1280 by 960. This is exciting for me as I do most of my development on my laptop.

 

Don’t forget to test in the real environment!
Note that even though you can actually write the application using the simulator, a great Surface application requires proper testing with real people on a real Surface device. That is the only way you will get real data of how people react to your application.