使用运动传感器Windows Phone 7进行编程 [英] Program using motion sensors windows phone 7

查看:112
本文介绍了使用运动传感器Windows Phone 7进行编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一个程序,并且我有一个对象,该对象的工作状况很好,箭头可以向前移动,而箭头可以向侧面移动.是否可以使用Windows Phone 7上的运动控件,将其向前倾斜时就像按下前进按钮,而向侧面倾斜时就像按下侧面按钮一样?如果是,我应该使用哪些控件?
我要问的是,我在Google上找不到任何对我有帮助的东西.

预先谢谢您.

I am doing a program and i have an object which is working fine with arrows to move forward and arrows to move sideways. Is it possible to use the motion controls on the windows phone 7 and when you tilt it forward it is like pressing the forward button and when you tilt it sideways it''s like pressing the side button? if yes what controls should i use?
I am asking as I couldn''t find anything that would help me on google.

Thank you in advance.

推荐答案

使用Microsoft.Devices.Sensors命名空间中的accelerometer类
http://msdn.microsoft.com/en -us/library/microsoft.devices.sensors.accelerometer(v = vs.92).aspx [
use the accelerometer class in Microsoft.Devices.Sensors Namespace
http://msdn.microsoft.com/en-us/library/microsoft.devices.sensors.accelerometer(v=vs.92).aspx[^]


也请看一下示例:如何:从Windows Phone的加速度传感器获取数据

Sandeep.
Also, take a look at this example: How to: Get Data from the Accelerometer Sensor for Windows Phone

Sandeep.


这篇关于使用运动传感器Windows Phone 7进行编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆