Opening a new window in silverlight

What is the difference in Silverlight 4 between calling System.Windows.Browser.HtmlPage.Window.Invoke ("openWindow"), where "openWindow" is a js function that calls window.open and calls System.Windows.Browser.HtmlPage.PopupWindow ( someUri, "_blank", null)?

+5
source share
2 answers

The difference is that the challenge is window.opennot a ratified standard. The purpose of the method PopupWindowin the Silverlight API is to abstractly change implementation openbetween browsers.

For example, the property names used for public parameters may vary by browser and browser. Using PopupWindow, your code can use a strongly typed class HtmlPopupWindowOptionsto sequentially define these parameters. The silverlight runtime processes the request to the browser to perform the desired action in a manner appropriate for the host browser.

+3
source

In addition, PopupWindow will work with a pop-up blocker if you open a pop-up window in response to a user action.

0
source

All Articles