I am using a Shake Gestures method which was claimed to work; however it isn't on my end. Note that this method is based on the sample provided by Microsoft. The steps I followed are the following. Please can anyone help me out?
Step 1: Add reference to shake gestures library, ShakeGestures.dll
Step 2: Add a using statement to file header
using ShakeGestures;
Step 3: Register to ShakeGesture event in your intialize or activate method
public MainPage()
{
InitializeComponent();
ShakeGesturesHelper.Instance.ShakeGesture += new
EventHandler<ShakeGestureEventArgs>(Instance_ShakeGesture);
// optional, set parameters
ShakeGesturesHelper.Instance.MinimumRequiredMovesForShake = 2;
// start shake detection
ShakeGesturesHelper.Instance.Active = true;
}
Step 4: implement the ShakeGesture event handler from step 3
private void Instance_ShakeGesture(object sender, ShakeGestureEventArgse)
{
Storyboard1.Begin();
}
The End. Thanks
Try this in the code-behind, worked for me.