Touch Gestures…..

Recently when trying out a game from one of our fellow WP7 developer friends, I noticed an issue on their high score tables, which plagued our very first high score tables.

The issue was what I would consider a very simple understandable mistake to make and thought that I would write about it in the hopes that if anyone ever actually reads theses posts that they will not fall foul of the same issue.

Imagine a scrolling high score table on a WP7 device. Now answer this – “how would you expect to scroll the list of scores?” I would like to think that most people would expect that dragging their finger up or down the screen would achieve this. With this in mind I had selected the VerticalDrag gesture, which seemed to work well. However after the release of the game and the score table filling up, it appeared that from time to time the scrolling would lock, especially when vigorously scrolling!

After a bit of investigation, I discovered this to be due to the fact that I was using the VerticalDrag gesture and technically, I wasn’t actually doing a vertical drag as sometimes when I was dragging quickly, I would go slightly diagonally and this diagonal motion is not registered as a VerticalDrag. Upon discovering this, I changed to using the FreeDrag gesture and only paying attention to the Y values. What this did is allow any form up vertical movement to register as scrolling and make the tables scroll as I would have expected them to.

Simple mistake to make? Yes. Easy one to avoid? Yes. Embarrassed that I cocked it up? No – that’s all part of learning.

I hope somebody finds this useful.