以编程方式在 Windows phone 7 中启动其他应用程序 [英] Launching other applications in Windows phone 7 Programatically

查看:33
本文介绍了以编程方式在 Windows phone 7 中启动其他应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从 Internet 下载一个文件,并将其保存在 IsolatedStorage 中.现在我想打开那个文件,即如果它是 excel 我们应该在安装了 excel 的情况下用 excel 打开一个文件,或者提示用户选择应用程序来打开该文件,就像在 PC windows 操作系统中一样,我们该怎么做这..给我一些想法..

I am downloading a file from Internet, and I am saving this in IsolatedStorage. and Now I want to Open that file, ie if it is excel we should open a file with excel if excel is installed, or otherwise prompt the user to choose the application to open that file as like in PC windows os, How can we do this.. give me some Idea..

推荐答案

作为一般规则,没有办法执行您所描述的操作.对此的例外是媒体,您可以将其与音乐和视频中心集成.例如,这将允许您下载一部电影,然后以与它是 zune 集合的一部分相同的方式播放它,即使它位于独立存储中.

As general rule, there is no way to do what you are describing. The exception to this is for media, for which you can integrate with the Music and Video hub. This would allow you to, for instance, download a movie and then play it in the same way as if it was part of the zune collection, even though it's in IsolatedStorage.

如果您想从互联网下载办公文件,您可以通过在 WebBrowserTask 中打开它们来直接链接到它们.然后用户将能够在相关办公程序中打开该文件.因此,如果您执行以下操作,文件将在 Excel 中打开:

If you want to download office files from the internet you can simply link to them directly by opening them in a WebBrowserTask. The user would then be able to open the file in the relevant office program. So, if you did the follwoing, the file would be opened in Excel:

var wbt = new WebBrowserTask();
wbt.URL = "http://example.com/file.xlsx";
wbt.Show();

这将不允许您将文件存储在 IndependentStorage 中,这对您来说可能是也可能不是问题.

This would not allow you to store the file in IsolatedStorage and that may or may not be an issue for you.

这篇关于以编程方式在 Windows phone 7 中启动其他应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆