win8开发入门——文件选取

时间:2014-11-24 20:41:43   收藏:0   阅读:202

win8文件选取采用异步方法,PickSingleFileAsync目前只适用于win8,并不能应用于wp。

FileOpenPicker openPicker = new FileOpenPicker();

openPicker.FileTypeFilter.Add(".jpg");

StorageFile file = await openPicker.PickSingleFileAsync();

 if (file != null)

{

}

评论(0)
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!