摘要:
前置条件:手机和电脑未连接或连接电脑Zune软件关闭(与Zune软件连接时不允许访问图片库); 版本7.1获取手机图片库图片的两种方式: PhotChooserTask方式和XNA方式进行获取 PhotChooserTask获取引用命名空间//引用//PhotoChooserTask类用到usingMicrosoft.Phone.Tasks;//BitmapImage类用到usingSystem.Windows.Media.Imaging; 隐藏文件代码:View Code usingSystem;usingSystem.Collections.Generic;usingSystem.Linq 阅读全文
摘要:
使用相机需要引用如下命名空间usingMicrosoft.Phone.Tasks;在这个案例中我们还用到了BitmapImage类,所以我们需要引用命名空间usingSystem.Windows.Media.Imaging;效果图如下MainPage.xaml文件在初始化的基础上添加了两个元素<TextBlockx:Name="txtName"Text="启动相机"Grid.Row="1"></TextBlock><Imagex:Name="img"Grid.Row="1&q 阅读全文