Over the weekend I have had tons of fun playing around with the Windows Phone 7 Developers Tools. The platform looks awesome, both from an end user perspective as well as a developer perspective.
One of the scenarios I’ve been exploring involves some simple multitouch pinch and zoom gestures. It’s fairly simple to add custom touch functionality by subscribing to the Manipulation Events hanging off all UIElements. If you got a touch enabled Windows 7 computer you can even test multitouch directly in the emulator. However, I was a little bummed when I read that, unlike the Surface SDK, simulating multitouch input using multiple mice was not supported:
“The Windows Phone Emulator does not support multitouch input through the mouse, so you must test scale transforms on a development computer that supports touch input, or test on an actual device.”
This is not entirely true. When I read this I remembered this cool blog post from Szymon Kobalczyk on emulating a multitouch device in Windows 7. In his post Szymon talks about the MultiTouchVista project. It’s an open source piece of software that lets you install a Windows 7 touch driver. The driver talks to a multitouch service that can read input from multiple sources and turn them into standard Windows 7 multitouch events. Sources for input include things like multiple mice, web cameras and Wii remotes. Since the MultiTouchVista application appears as a standard Windows 7 touch driver it will work in any Windows 7 touch-enabled application, like the Windows Phone 7 emulator.
For detailed installation instructions, check out the projects official CodePlex site. I have recorded a quick demo showing multitouch in Silverlight 3, MS Paint and the Windows Phone 7 emulator using two mice connected to my iMac.