简体   繁体   中英

Opening a new window in silverlight

Silverlight 4在调用System.Windows.Browser.HtmlPage.Window.Invoke(“openWindow”)之间有什么区别,其中“openWindow”是一个调用window.open并调用System.Windows.Browser.HtmlPage.PopupWindow的js函数( someUri,“_ blank”,null)?

The difference is that calling window.open is not a ratified standard. The purpose of the PopupWindow method in the Silverlight API is to abstract variations of the implementation of open between browsers.

For example the property names used for open options may vary from browser to browser. Using PopupWindow your code can use the strongly typed HtmlPopupWindowOptions class to define these options in a consistent way. The silverlight runtime handles the making the request to the browser to perform the desired action in a way appropriate to the host browser.

此外,如果您打开弹出窗口以响应用户操作,PopupWindow将使用弹出窗口阻止程序。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM