WPF .NET4 web浏览器和Internet Explorer 8 [英] WPF .net4 webBrowser and Internet Explorer 8
问题描述
我有导航到使用一个CSS文件的本地HTML页面中的WebBrowser组件一个WPF .NET4应用程序。
I have a WPF .net4 app with a webBrowser component that navigates to a local HTML page that uses a CSS file.
当我浏览到使用IE8的CSS样式是corrrect的页面,但是当我浏览网页,在网页浏览器组件的CSS样式是错误的。
When I navigate to the page using IE8 the CSS styling is corrrect, but when I navigate to the page in the webBrowser component the CSS styling is wrong.
我错在以为web浏览器使用相同的ActiveX IE8?或者是有一些属性(S)我在WebBrowser组件设置?
Am I wrong in thinking that the webBrowser uses the same activex as IE8? or is there some attribute(s) I have to set in the webBrowser component?
在此先感谢您的帮助。
Thanks in advance for any help.
推荐答案
这可能是一个有点晚,但我无意中发现了这个问题,寻找其他的答案。
This is probably a little late but I stumbled on to this question in search of other answers.
默认情况下,WebBrowser控件怪癖模式呈现。但在你的网页,你可以指定IE浏览器的版本使用的元数据来呈现。
the WebBrowser control by default renders in quirks mode. but in your webpage you can specify the version of IE to use to render in the meta data.
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
IE =边缘指示WebBrowser控件使用IE浏览器的最新版本,它支持
IE=edge instructs the WebBrowser control to use the latest version of IE it supports
这篇关于WPF .NET4 web浏览器和Internet Explorer 8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!