This is part of a series on New WPF Features
WPF supports multitouch API’s in .NET 4. You can have touch and manipulation operations on all the UI elements.
For creating a touch based app, you would need to subscribe to the events:
The TouchEventArgs class has some helpful API
· GetTouchPoint - Returns the current position of the touch device relative to the specified element.
· TouchDevice - Gets the device that generated the event.
To add manipulations, you first need to set the bool IsManipulationEnabled property. Once done you can now listen to the manipulation events
You can restrict the manipulations that are allowed by specifying the ManipulationMode in the Starting event.
Manipulation events do not occur.
A manipulation can translate an object horizontally.
A manipulation can translate an object vertically.
A manipulation can translate an object.
A manipulation can rotate an object.
A manipulation can scale an object
A manipulation can scale, translate, or rotate an object and can occur with one point of input.
Next you listen to the delta in the manipulations and perform the necessary transform, rotation,…
Gets or sets the amount the manipulation has resized in .
Gets or sets the rotation of the manipulation in degrees.
Gets or sets the amount the manipulation has resized as a multiplier.
Gets or sets the linear motion of the manipulation.
A sample app demonstrating the usage can be found here
Touch design guidelines can be found here