如何在Windows Phone 8上打开文件?

时间:2014-02-18 11:52:41

标签: file windows-phone-8

在我的应用程序中,我下载了几种文件(如音频,视频,pdf,powerpoint等)。

所以我从webserver收到这些数据作为byte []对象。

所以我想现在用视频播放器或pdfreader打开它们。

我应该做什么?

我试过这段代码,但我想这只有在你的项目文件夹中存储了一个文件时才有效(这不是我的情况)......不是吗?

   
              // Access the file.
              StorageFile pdfFile = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync("FileToRead.pdf");

              // Launch the pdf file.
              await Windows.System.Launcher.LaunchFileAsync(pdfFile);

1 个答案:

答案 0 :(得分:0)

使用此命令从隔离存储中获取文件

var file = await ApplicationData.Current.LocalFolder.GetFileAsync(filename);
相关问题