Rewrite a WPF application to the surface

I am working on a WPF application, and I wonder what it takes to rewrite this application into a Surface application if we want to somehow control it through multitouch.

Is it possible that we can reuse large parts of our WPF application and seamlessly switch to Surface, or is it Surface completely different and we probably have to write a completely new GUI for Surface? Or can I use WPF apps on Surface? How can you perhaps say that I have no idea about Surface - so please tell me something obvious!

We do our best to simulate an application with a good separation between View and business logic - using the MVVM template, etc. But do we need to create a completely new graphical interface for the surface?

+2
wpf pixelsense
source share
3 answers

If your goal is to simply add multi-touch to regular desktop applications, you really should look at .NET 4.0 in Windows 7. By doing this, you can start with an existing application and simply add any multi-touch features you find useful.

If you switch to Surface, the main changes that you will see in the code if direct port execution changes all of the input controls on the Surface version (i.e. the to s: SurfaceButton button). This is necessary to support Surface Contact inputs that do not activate features such as Button.Click on standard controls.

There are a few other important issues with Surface apps that you really can't understand just using the desktop emulator. Firstly, this is a multi-user experience, including not only the huge number of simultaneous touches that it supports, but also the multi-directional orientation of the user interface. Since Surface is a horizontal screen, users can come from the application from any direction, and the application itself can also be flipped vertically depending on the direction in which the application starts. This may require a lot of thought about how the features of the desktop application should be redesigned. The surface also has a fixed resolution of 1024x768, which can also lead to inconvenient transitions from dynamic-size desktop applications designed for large screens.

+3
source share

If the application used only the basic WPF controls, then ideally the change that may be required for the Surface port is very minimal. You just need to replace all the typical WPF controls with the appropriate Surfacecontrols and add the appropriate Contact events if you have already done some Mousevents in the code.

Of course, based on the special MultiTouch experience that you may need in Surface, the XAML and LayOut styles can be completely different, but when you follow the proper MVVM, you do not need to change any C # code, as well as the entire structure of the UserControl project, Therefore, be sure to create projects as View and ViewModel so that SurfaceView and WPFView projects refer to the same MVVM DLL.

+2
source share

WPF is the primary surface development platform right now.

The Microsoft Surface Blog has an excellent article on WPF Surface Development Resources .

+1
source share

All Articles