Multi-touch in Silverlight 3


Jesse Bishop is a program manager on the Microsoft Silverlight team talks about implement Multi-touch Gesture Recognition in Silverlight 3

“Silverlight 3 provides all the info you need to receive and interpret multi-touch input on Windows 7, but it takes some work to translate these events into standard gestures – like “pinching” to zoom in or out (a list of other common gestures, and some good background info, can be found on the Engineering Windows 7 blog).

Tim Heuer gave a great introduction to the basics of Silverlight 3 multi-touch, covering hardware/software requirements and how to listen to the application-wide Touch.FrameReported event to get touch information.  Building on these basics, I’d like to give a short example of how you can add support for some common gestures – such as Translation, Rotation, and Scaling – to your touch-aware Silverlight 3 application on a per-element basis.

At a high level, the steps to accomplish this are:

  1. Receive touch events at an app level.
  2. Route touch events to the target element(s) being manipulated.
  3. Interpret touch events on a target element as gestures.
  4. Hook up gestures to manipulate the element.

To make things a bit simpler and more reusable, I’d like to create a static class to accomplish #1 and #2 – I’ll call it TouchProcessor.

For #3 and #4, I would also like to be able to reuse this logic – so I’ll create a GestureController class to receive events on behalf of an element, and define an ITouchElement interface that it can use to manipulate elements.”

Delving into more detail on each of these –> jebishop.blog

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s