以编程方式启动 Windows Phone 7 中的其他应用程序

发布于 2024-10-17 19:19:57 字数 151 浏览 1 评论 0原文

我正在从互联网下载一个文件,并将其保存在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..

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

撕心裂肺的伤痛 2024-10-24 19:19:58

一般来说,没有办法做你所描述的事情。媒体除外,您可以将其与音乐和视频中心集成。例如,这将允许您下载一部电影,然后以与 zune 集合的一部分相同的方式播放它,即使它位于isolatedStorage 中。

如果您想从互联网下载 Office 文件,您只需在 WebBrowserTask 中打开它们即可直接链接到它们。然后,用户就可以在相关的办公程序中打开该文件。因此,如果您执行以下操作,文件将在 Excel 中打开:

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

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

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.

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();

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

油焖大侠 2024-10-24 19:19:58

Windows Phone 应用程序独立运行,除了极少数例外,无法与其他程序交互。因此,您无法提供程序选择器来允许用户选择要启动的另一个应用程序。

Windows Phone applications run in isolation and with very few exceptions cannot interact with other programs. So there's not a way for you to present a program chooser to allow the user to choose another application to launch.

爱本泡沫多脆弱 2024-10-24 19:19:58

我很确定有针对不同应用程序的系统启动器。例如,YouTube 应用程序可以按照我在此处展示的方式以编程方式启动 - 基本上它类似于马特展示的方式。最终,每个应用程序都是通过 UIX 参考启动的(位于此处),但没有公共端点来打开 res URL。

I am pretty sure there are system launchers for different applications. For example, the YouTube application can be launched programatically the way I showed here - basically it is similar to the way Matt showed. Ultimately, each app is launched via a UIX reference (catched here), but there is no public endpoint to open a res URL.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文