Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will the IE9 WebBrowser Control Support all of IE9's features, including SVG?

I recently upgraded to IE9-beta. Now, In my .Net (3.5) WinForm application I want to use WebBrowser control.

So my question is, whether the WebBrowser control will exhibit all properties and functions of IE9?

My concern is, I want to render some SVG graphics on it.

like image 914
Omkar Avatar asked Jan 06 '11 06:01

Omkar


1 Answers

WebBrowser control will use whatever version of IE you have installed, but for compatibility reasons it will render pages in IE7 Standards mode by default.

If you want to take advantage of new IE9 features, you should add the meta tag <meta http-equiv="X-UA-Compatible" content="IE=9" > inside the <head> tag of your HTML page.

This meta tag must be added before any links to CSS, JavaScript files etc that are also in your <head> to work properly though (only other <meta> tags or the <title> tag can come before it).

An alternative is to add a registry entry to:

HKLM > SOFTWARE > Microsoft > Internet Explorer > Main > FeatureControl > FEATURE_BROWSER_EMULATION

And in there add 'myApplicationName.exe' with value '9000' to force the WebBrowser control to display pages in IE9 mode. Though there are other values you can use too too, note that these docs aren't entirely accurate as it does not seem possible to get a page to render in IE 8 mode whatever value you use.

Adding the registry key to the same path in HKCU instead of HKLM will also work - this is useful as writing to HKLM requires admin privileges where as HKCU does not.

like image 133
Michael Low Avatar answered Oct 13 '22 05:10

Michael Low