Animating swipe gestures (Windows Store apps using JavaScript and HTML)

This topic has not yet been rated - Rate this topic

Use swipe animations when you implement the Windows 8 touch selection model (called a "swipe") for selection of an item.

This set of animations consists of the following APIs. All three of these animations must be used when you implement the swipe interaction:

The following video demonstrates the swipe reveal animation:

|

The following video demonstrates the swipe select and deselect animations:

|

Note  The Windows ListView control includes touch selection and the swipe animations.

Swipe select

Use the swipe select animation when the user drags an item that supports swipe selection. The user must drag the item far enough to select it, and then releases it. The swipe select animation adds the selection indicator (often a check mark) that shows the "selected" state on the item and moves the item back to its rest position.

Illustration showing the steps in a swipe select animation: move and check

To use this animation, you need to know the selection indicator that will be shown and the direction and distance of the animation.

Swipe deselect

Use the swipe deselect animation when the user drags a currently selected item. The user must drag the item far enough to deselect it, and then releases it. The swipe deselect animation removes the selection indicator from the item and moves the item back to its rest position.

Illustration showing the steps in a swipe deselect animation: move and uncheck

To use this animation, you need to know the selection indicator that will be hidden and the direction and distance of the animation.

Swipe reveal

Use the swipe reveal animation to show the user that the item supports the swipe interaction. When the user presses and holds an item that supports the swipe interaction, the animation moves the item down and then back up, as a hint that the item supports the swipe interaction.

Illustration showing the steps in a swipe reveal animation: move and uncheck

To use this animation, you need to know the direction and distance of the animation. The animation must be played twice sequentially, first to move the item in the specified direction, and then again to move the item back to the rest position.

Other resources

See the Using the Animation Library animations sample for code examples that demonstrate the use of the swipe animation APIs.

See Guidelines and checklist for swipe animations for design best practices in the use of these animations.

Related topics

Animating your UI
swipeReveal
swipeSelect
swipeDeselect

 

 

Build date: 3/5/2013

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.