WPF WebBrowser Control: What browser does it use?

独自空忆成欢 提交于 2019-11-26 23:30:01

问题


Does the WPF WebBrowser control always use Internet Explorer or does it use the default web browser on the system ?

Regards, MadSeb


回答1:


Internet Explorer, though there are "hacks" posted on the internet which allow you to use a workaround in order to launch any browser you like.

This thread seems to explain one of the possible solutions.




回答2:


One issue the Web Browser Control has that it’s perpetually stuck in IE 7 rendering mode by default. Even though IE 8 and now 9 have significantly upgraded the IE rendering engine to be more CSS and HTML compliant by default the Web Browser control will have none of it. IE 9 in particular – with its much improved CSS support and basic HTML 5 support is a big improvement and even though the IE control uses some of IE’s internal rendering technology it’s still stuck in the old IE 7 rendering by default.

This applies whether you’re using the Web Browser control in a WPF application, a WinForms app, a FoxPro or VB classic application using the ActiveX control. Behind the scenes all these UI platforms use the COM interfaces and so you’re stuck by those same rules.

See this: Web Browser Control – Specifying the IE Version

http://www.west-wind.com/weblog/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-Version



来源:https://stackoverflow.com/questions/3822537/wpf-webbrowser-control-what-browser-does-it-use

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!