个人网站地址:http://www.dahei.me
摘要: 为图片或按钮自定义图片工程目录下新建文件夹Images,将图片文件复制到Images文件夹里,本文以image1为例1.在xaml里加背景图片 image图片:<Stretch="Fill" Source="Images/image1.png" Name="image"/> Button背景图片:<Button Name="button1" > <Button.Background> <ImageBrush ImageSource="/Images/image1. 阅读全文
posted @ 2013-01-06 14:35 大黑 阅读(341) 评论(0) 推荐(0) 编辑
摘要: 1. 引人传感器类库 using Microsoft.Devices.Sensors2.通过Accelerometer.IsSupported判断当前设备是否支持加速度传感器,如果返回false则表示设备不支持加速度感应器。 f (Accelerometer.IsSupported) {// lblAccelerometerStatus.Text = "此设备支持加速度传感器"; } else {// lblAccelerometerStatus.Text = "此设备不支持加速度传感器"; }3.打开加速度设备,设置监听获得,x,y,z轴对应的加速度值 阅读全文
posted @ 2013-01-06 14:11 大黑 阅读(242) 评论(0) 推荐(0) 编辑
个人网站地址:http://www.dahei.me