article

Configuring the emulation mode of an Internet Explorer WebBrowser control

Occasionally I need to embed HTML in my applications. If it is just to display some simple layout with basic interactions, I might use a basic component that doesn't need the weight of Internet Explorer. In most cases however, I need a more complex layout, JavaScript or I might want to display real pages from the internet - in which case I'm lumbered with the `WebBrowser` control. This control 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. This article provides a helper class to easily set the browser emulation version from your C# applications.

avatar
Richard Moss