Manipulations and Inertia in the Core Layer
The .NET Framework 4 manipulation processor enables your application to track changes that are made to touches in a touch point collection. When users interact with an application that uses the manipulation processor, they can move, rotate, and scale objects on the Microsoft Surface screen. Changes that are made by a user's fingers are interpreted together with other touches that are part of the manipulation collection. You can create multiple manipulation processor objects simultaneously to support more than one set of hands.
When a new TouchPoint object is created and added to the list of available contacts (a ReadOnlyTouchPointCollection object that is obtained through the GetState method), your application can copy the information from the TouchPoint object to a Manipulator2D structure and then pass the Manipulator2D structure to the .NET Framework 4 manipulation processor. The manipulation processor then raises events, which your application can handle to update the visual component in an appropriate way.
A manipulation consists of one or more manipulators. An application or control provides information about manipulators to the manipulation processor by calling the ProcessManipulators method and passing in the collection of Manipulator2D structures.
When an application calls ProcessManipulators, the state of the manipulation is recalculated. Any applicable change causes manipulation events to be raised.
For detailed information about how to use manipulations in your Surface applications, see the Manipulations and Inertia Overview. You can also find code examples for XNA applications in the following topics:
© Microsoft Corporation. All rights reserved.