15.4. Multitouch Functionality

Probably one of the most interesting features in WPF 4.0 is multitouch functionality. Multitouch allows your application to work with touch input and gestures (e.g., you can spin an image around by rotating your hand).

Multitouch support is Windows 7 only and is enabled by setting the IsManipulationEnabled property on an element to true and then handling the various events that the APIs expose. It's worth noting that multitouch functionality is compatible with Surface SDK 2.0 (the world's most expensive but cool table).

The ContentElement, UIElement, and UIElement3D elements support the following events:

  • PreviewTouchDown

  • TouchDown

  • PreviewTouchMove

  • TouchMove

  • PreviewTouchUp

  • TouchUp

  • GotTouchCapture

  • LostTouchCapture

  • TouchEnter ...

Get Introducing .NET 4.0: with Visual Studio 2010 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.