2014-05-08 119 views

回答

1

如果你的应用程序只需下载一个文件,它进入存储文件夹,您可以用发射器类从中可以打开下载的手机推出一个应用程序档案给你。

类StorageFolder将帮助您获得StorageFile。 考虑你已经有了那种StorageFile的对象,你可以使用下面的行从您的手机会自动启动合适的应用程序::

 await Launcher.LaunchFileAsync(storageFile); 

这将打开与该文件类型关联的应用程序。 我希望我的问题清楚明了,并且朝着正确的方向回答。 谢谢。

+0

这就是我在找的,谢谢。 – sunjinbo

0

希望该代码与选择照片类似。 如果是,那么请考虑下面的代码片段:

 FileOpenPicker openPicker = new FileOpenPicker(); 
     openPicker.ViewMode = PickerViewMode.Thumbnail; 
     openPicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary; 
     openPicker.FileTypeFilter.Add(".doc"); 
     openPicker.FileTypeFilter.Add(".docx"); 

     // Launch file open picker and caller app is suspended and may be terminated if required 
     openPicker.PickSingleFileAndContinue(); 
相关问题