views:

46

answers:

2

How would I use the accelerometer in WinPho7 to detect shaking the phone and have that trigger an event. For example, to roll dice, you would shake the phone.

A: 

You would be after the Accelerometer class in the Microsoft.Devices.Sensors namespace.

While this quick how-to is targeted at XNA game development, it gives a good example of the usage of the Accelerometer class.

ShaunO