Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF .net4 webBrowser and Internet Explorer 8

Tags:

c#

.net

I have a WPF .net4 app with a webBrowser component that navigates to a local HTML page that uses a CSS file.

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.

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.

like image 729
Michael Avatar asked Dec 02 '22 04:12

Michael


1 Answers

This is probably a little late but I stumbled on to this question in search of other answers.

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=edge instructs the WebBrowser control to use the latest version of IE it supports

like image 133
Ron Avatar answered Dec 19 '22 21:12

Ron