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.
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.