如何识别是否在新的浏览器窗口或选项卡中打开了silverlight应用程序? [英] How to identify if a silverlight application is opened in a new browser window or tab ?

查看:77
本文介绍了如何识别是否在新的浏览器窗口或选项卡中打开了silverlight应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个银光(5)应用程序,其中包含应用程序内部的选项卡,而不是浏览器中的选项卡。考虑到应用程序已在浏览器中打开,其中包含2个选项卡。当用户尝试在新窗口/选项卡中打开应用程序时,它应该在之前打开的浏览器中显示为新选项卡(应用程序内部而不是浏览器)。



如果应用程序URL粘贴在同一浏览器选项卡中,则粘贴的URL应该可以正常工作。





我在aspx中使用了SHDocVW.ShellWindows主持silverlight项目的页面,找到已经打开的Internet Explorer和他们的位置URL。



SHDocVW.ShellWindows allWindows = new SHDocVW.ShellWindows();



while(allWindows.GetEnumerator())

{

检查是否是IE并获取URL

并通过initparams将该值传递给silverlight应用程序

}



这在本地测试时效果很好但不起作用预期在部署之后。



部署服务器是Windows Server 2008并且具有IIS 7(它没有IIS管理服务,因此设置允许Se与桌面交互的服务不是一个选项。



请帮助我们解决问题。



如果ShellWindows以外有其他可能,请告诉我们吗?



问候,

Pallavi

I have a silver-light(5) application which has tabs internal to the application and not tabs in the browser. Consider that application is already open in a browser with 2 tabs inside it. When the user tries to open application in new window/tab it should be shown in the previously opened browser as a new tab(internal to application and not browser).

If the application URL is pasted in the same browser tab, the pasted URL should work.


I used SHDocVW.ShellWindows in the aspx page that hosts the silverlight project to find the internet explorers already open and their Location URL's.

SHDocVW.ShellWindows allWindows = new SHDocVW.ShellWindows();

while(allWindows.GetEnumerator())
{
check if it is IE and also get the URL
and pass that value to silverlight app via initparams
}

this works good when tested in local but doesnt work as expected after deployment.

The deployment server is Windows Server 2008 and has IIS 7(it doesnt have a IIS Admin Service and hence seting Allow Service to interact with desktop is not an option) in it.

Please help us in solving the issue.

Please let us know if there is any possibility other than ShellWindows ?

Regards,
Pallavi

推荐答案

看看这里: Can silverlight在浏览器实例中检测或通信? [ ^ ]。它可能会帮助你解决问题。



它也可能很有趣:

Out-of-Browser支持 [ ^ ]
Have a look here: Can silverlight detect or communicate across browser instances?[^]. It might help you to solve the problem.

It might be interesting too:
Out-of-Browser Support[^]


这篇关于如何识别是否在新的浏览器窗口或选项卡中打开了silverlight应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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