WPF WebBrowser Control: What browser does it use?

2019-01-15 14:52发布

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

Regards, MadSeb

2条回答
beautiful°
2楼-- · 2019-01-15 15:15

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.

查看更多
三岁会撩人
3楼-- · 2019-01-15 15:33

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

查看更多
登录 后发表回答