Amazing-Ren

导航

2013年8月14日 #

例子:Bluetooth app to device sample

摘要: 本例子演示了:判断蓝牙是否打开,是通过一个HRsult值为0x8007048F的异常来判断的catch (Exception ex) { if ((uint)ex.HResult == 0x8007048F) { var result = MessageBox.Show(AppResources.Msg_BluetoothOff, "Bluetooth Off", MessageBoxButton.OKCancel); if (resul... 阅读全文

posted @ 2013-08-14 17:54 Amazing-Ren 阅读(289) 评论(0) 推荐(0) 编辑

例子:Basic Lens sample

摘要: 本例演示了如何自己扩展一个Camera Lens。1. UI界面是一个MediaViewer 2. 实现类: public enum ViewModelState { Unloaded, Loading, Loaded, AutoFocusInProgress, PointFocusAndCaptureInProgress, AutoFocusAndCaptureInProgress, CaptureInProgress } class LensViewModel : DependencyObject, INotifyPropertyChanged, ICamer... 阅读全文

posted @ 2013-08-14 16:24 Amazing-Ren 阅读(180) 评论(0) 推荐(0) 编辑

例子:Backup Isolated Storage To SkyDrive

摘要: 本例演示了如何从隔离存储中备份文件到SkyDrive。1. 登陆微软网站,申请“Create application”,获取一个“Client ID”2. XAML中添加对Live相关控件库的命令控件xmlns:my="clr-namespace:Microsoft.Live.Controls;assembly=Microsoft.Live.Controls"3. 使用Live控件 () --> ... 阅读全文

posted @ 2013-08-14 15:21 Amazing-Ren 阅读(217) 评论(0) 推荐(0) 编辑

例子:Background Transfer Service Sample

摘要: 本例演示了如何使用后台传输服务来进行后台文件下载,也就是说及时App已经停止运行,同样可以通过后台代理进行文件的下载操作。对于后台文件传输一下知识点必须注意:1. 通过使用BackgroundTransferRequest对象的Method属性来设置传输方法, Get, Post。2. 后台传输的所有本地路径都必须位于您应用程序的独立存储中,在名为“/shared/transfers”的根目录中。3.由于多个应用程序可能已排列后台传输,因此在先前添加的传输完成之后、传输开始之前可能有额外的延迟。4. BackgroundTransferRequest对象的Headers属性用于设置传输请求的 阅读全文

posted @ 2013-08-14 14:27 Amazing-Ren 阅读(327) 评论(0) 推荐(0) 编辑

例子:Background Audio Streamer Sample

摘要: The Background Audio Streamer sample demonstrates how to create an app that uses aMediaStreamSourceto stream audio content from aAudioStreamingAgent. This agent will run in the background and under the lock screen where you can control the audio using the Universal Volume Control (UVC). You can also 阅读全文

posted @ 2013-08-14 11:05 Amazing-Ren 阅读(269) 评论(0) 推荐(0) 编辑