Programming Microsoft Surface

This post contains some high resolution images, please wait till all the images are loaded and click on them to enlarge.

Microsoft Surface computing is awesome and for me the business strategy behind the scenes are very very awesome. Microsoft released surface computer and very limited set people are using it right now. Because it is expensive and needs rich infrastructure as well. But in the business point of view MS released surface because surface computing needs lot of innovation from the hardware vendors. The first release was a big bulk desk, and the second release of Samsung SUR 40 it is slim; just 4 inches. So in the future it will be like a paper and the real surface. So when the world is really ready for the surface, the real surface will also be ready.

microsoft-surface-5

 

The world is not yet ready for the surface, so as the surface computing. So MS took the above strategy to make the surface mature and available when really the majority of the world is matured to have the surface.

Surface computing provides a software platform as like other devices of the IT industry. The surface software platform is built on top of WPF. It also includes the Power Shell administration.

To develop surface applications we do not need to have a surface computer. 🙂 You can develop and test the applications in your PC like you develop the WPF applications. To do this you have to install Surface SDK and the Surface runtime in your machine.You can download the Surface SDK (still in beta) from here

Once you installed them you will have surface application template in Visual Studio.

image

It offers surface type controls and you can do the programming with that. Some built in controls are really cool. UI is defined using XAML.

A sample application to view pictures and to arrange them in two stacks with a floating interface would be like this.

Note :

Surface computer is a very powerful hardware device. It has infrared sensors in built which can detect the objects placed on it and capable of connecting with them.

It is capable to take 52 touch inputs with pressure at a time. (In the future this may increase). If you consider a person dealing with the surface computer with all his fingers, it can still handle 5.2 people at a time. Mostly we use 2 points. So in a best scenario 26 people can interact with it. And all the touches are measured with the pressure.

When we develop our applications in the machine, we don’t need a touch enabled screen. But if you have a 2 point touch enabled screen it will be nice. (You can resize images, videos and more …) And another major limitation is, most of the PC monitors or laptops which are touch enabled detect the point of a touch. They cannot detect the pressure. SDK provides events and methods we can use with the pressure.

So when we do development in a PC we can neither check those hardware specific methods nor object detection.

But still we can have fun.

This is a sample code shows how you can create movable items in the surface. These are free moving and 2 point resizable objects.

ScatterView is the XMAL snippet for creating this free floating objects.

(Click the image to view the enlarged code)

image

As you can see the code is simple XAML , and we can place any number of and any type of controls inside the scatter view. I have used media element controls to put videos and Image tags to put images inside the ScatterView.

The transforms and the other settings are optional.

This single line create a multi touch enabled drawing panel. (Margins are optional)

image

I created a drawing board embedded with n image where we can color the image. (See how it works in action)

image

In the above image you can see the disadvantage of the point touch. I can draw thin lines (point lines)  since my laptop touch screen is not pressure sensitive. In the real surface you can draw with the thickness of your own finger which gives a real drawing experience. You can also adjust the thickness programmatically.

I tried something more with surface SDK with mixing the scatter view with traditional WPF features and created a stunning floatable windows in the desktop. Where you see only objects no any windows and cross overlaps on each other. It is bit advance and I didn’t explain the code here, but some images are given below.  Enjoy 🙂

Sorry for the white marks on the image and taskbar as I have to hide some files and programs.

Floating objects in desktop. (As you see three of them are media players and two image viewers)

1

They are completely independent and the coolest feature is they are not windows. They act as objects in separate frames. The below images show that, see how I’m interacting with the desktop while they are floating on the desktop.

This picture shows that I’m interacting with the desktop. I’m hovering on a file which is partially covered by one of the floating object, but still I can get the description of the file.

2

Here I’m interacting with the task bar and the start button.

3

Other than this surface SDK offers plenty of nice tools like StackLibrary and Containers. Flexible surface is another feature which creates a water like surface. When touch or click on the screen you can experience ripples.

I’ll try to put a video, I still do not have a YouTube account. 😛

Advertisement

8 thoughts on “Programming Microsoft Surface

  1. I think the we can get the floating objects using the transparent window !\?

  2. yes I used the tranperant window of WPF, but to make them individual objects you need to do some tweaks using the surface SDK, I don’t know whether the SDK is intended to be used like this, but we can create like this. 🙂

  3. Pingback: Introducing MS PixelSense Technology | Thuru in HTTP(S) ;)

  4. Hello there, just was aware of your blog via Google, and found that it’s really informative. I’ll be grateful in case you proceed this in future. Lots of folks will likely be benefited from your writing. Cheers!

  5. Thanks , I have recently been searching for info approximately this subject for a long time and yours is the best I have came upon till now.

  6. Hallo! I would like to ask you for an interview about Microsoft Pixelsense. I wrote you on Twitter 🙂 Please, send me an e-mail (vardacarrera@gmail.com)

Comments are closed.