BigPete
BigPete

Reputation: 778

Shake control for Windows Phone 7

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.

Upvotes: 5

Views: 1046

Answers (2)

Arose92Flatbed2
Arose92Flatbed2

Reputation: 301

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.

Upvotes: 0

Related Questions