It would be nice to create a list of differences between the two versions of the surface SDKs (1.0 and 1.5 of the assemblies) and possible workarounds. While porting my surface app to win7 I've already come across a few issues. and I'm sure there are many
A proper wiki page would be better than this forum, but I don't know if that's possible on codeplex so I figured I just post the issues I've found so far and then work from there..
Controls in the surface version of the SDK and their Win7 counterparts:
(this list assumes you use Blake.NUI's SurfaceTouchDevice to re-route contact events to Win7 touch events)
SurfaceElementMenu - closest match in standard .NET is the context menu, but it's not touch optimal.
SurfaceUserControl - Use normal UserControl
SurfaceContentControl - Use normal ContentControl
TagVisualizers - No match in the Win7 API
SurfaceTextBox - Use normal text box, but this requires you to manually open the virtual keyboard on the surface device (using the static methods in the Microsoft.Surface.Core.SurfaceKeyboard class)
SurfaceShell and its related functionality (notifications, app orientation etc.) - no match in the Win7 APIs. As these are hardware specific, just put this code in the surface specific project and not in the common assembly.
Differences in APIs:
- BeginDragDrop returns SurfaceDragCursor instead of a bool. It returns null if drag drop failed.
- BeginDragDrop on the 1.0 API only accept Cursor or MouseDevice in the list of devices (see
ContactHoldGesture and ContactTapGesture - no equivalent in the current Win7 .NET APIs. Hold can be emulated by starting a dispatcher timer on (Preview)TouchDown and check if the touch is still there when the timer callback is called.
Manipulation and Inertia - The win7 controls have built in support for this - no need to create your own processors. Also, the new .NET 4 processors handle changes in two dimensions (x & y) allowing better natural response to user input.
Anyway, these are the ones I've come across so far.