The WebBrowser in VS making you crazy with its IE7 emulation mode? Here's how you can IE 8/9/10/11 it and more... (Think "WebBrowser Control Emulation Mode" post of the day)
Visual Studio has an embedded browser, but it uses the IE 7 render path?! Really, that is pretty messed up.
Thankfully, you can fix this yourself with a quick registry addition. Note: Fiddling with the registry can break your device, so be careful and this carries the usual “this works on my machine” and it is your own risk for doing this. The key you need to care about is:
I set the value to (HEX) 2af9 – since I have IE 11 on my Windows 8.1 machine, but you can pick from the list of options to best suit your needs and now it just works! No issues on GitHub
Windows Internet Explorer 8 and later. The FEATURE_BROWSER_EMULATION feature defines the default emulation mode for Internet Explorer and supports the following values.
I know you're thinking, "VS just embed's the WebBrowser control, which I like to do to, sometimes. Can I make this magic happen for me too?" Or "I'd like a little more detail and depth!"
Funny you should ask that...
I'm aware other embeddable browsers exist, but the idea of shipping additional multi-MB dependencies doesn't make sense unless an application makes heavy use of HTML interfaces
WebBrowsercontrol annoys me in myriad ways, but it does get the job done. One of the things that occasionally frustrates me is that by default it is essentially an embedded version of Internet Explorer 7 - or enabling Compatibility Mode in a modern IE session. Not so good as more and more sites use HTML5 and other goodies.
Rather fortunately however, Microsoft provide the ability to configure the emulation mode your application will use. It's not as simple as setting some properties on a control as it involves setting some registry values and other caveats, but it is still a reasonable process.
There you go! Just about everything you've every wanted to know about this (or not)