我正在8.1应用程序中测试PhotoChooserTask,我没有看到模拟器附带的任何可用示例图像?有没有办法获取样本图像?
void photoChooserTask_Completed(object sender, PhotoResult e)
{
if (e.TaskResult == TaskResult.OK)
{
//MessageBox.Show(e.ChosenPhoto.Length.ToString());
//Code to display the photo on the page in an image control named myImage.
System.Windows.Media.Imaging.BitmapImage bmp = new System.Windows.Media.Imaging.BitmapImage();
bmp.SetSource(e.ChosenPhoto);
myImage.Source = bmp;
}
}
答案 0 :(得分:1)
您无需从互联网上下载。我找到了一个很好的解决方法..在新的WP8.1模拟器中,您可以选择模拟SD卡。这很棒。我创建了一个博客文章和一个YouTube视频。看一看。希望它有所帮助。
http://wpdevkvk.wordpress.com/2014/07/19/adding-your-own-photos-to-windows-phone-8-1-emulator/