我将我的图片序列化为Uri
,我在反序列化方面遇到了麻烦
var storageFile = await StorageFile.GetFileFromPathAsync(temp[0].BackStage.AbsoluteUri);
using (var stream = await storageFile.OpenReadAsync())
{
await BackStageImg.SetSourceAsync(stream);
}
这段代码不起作用,它说"你没有访问权限"当我尝试将Uri
添加到StorageFile
答案 0 :(得分:0)
我将文件复制到App Local Folder
并选择
StorageFile localFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appdata:///local/background"));