问题
I'd like to write a Silverlight app that has 2 or more browser windows that "interact".
An example would be a parent/details display where selecting an item in the "Parent" list (in one browser window) will display the details of the item in another window.
The main point is so that on a multiple-monitor setup the user could have the main screen on one monitor and "tool" windows on the other. Like how I use VS.
Is this possible? Any links/sample code etc?
Thanks!
回答1:
You should be able to accomplish this by using the javascript bridge support in Silverlight. With this method you could use javascript to spawn a new window with the url of the child window. At that point you could continue to use javascript to communicate between the two windows. Something like this: http://codepunk.hardwar.org.uk/bjs12.htm
回答2:
Cool. Jeremy's answer popped up before mine. That's a good possible solution.
You can also do this with a web service. You can use a polling duplex binding to communicate between multiple clients.
This silverlight service demo might be interesting...
回答3:
In ScottGu's Announcing Silverlight 5 blog entry he says that OOB apps will have support for child windows.
Thought I'd share and also bump this question as it's been a while - any frameworks out there that allow inter-(IE) window communication for Silvelight?
来源:https://stackoverflow.com/questions/267137/multiple-screens-monitors-with-silverlight