In this article, Arik Poznanski shows how you can use the Shake Gestures Library in your application.
Source: The Code Project
This document introduces a helper library for identifying shake gestures by using the accelerometer built into Windows Phone 7 devices. It explains how to use the library, how the library works internally, and how you can configure the library’s parameters to adapt gesture detection to your needs.