I’m would like to embed Internet Explorer into an WPF Windows Application.
I have been searching for a way and found that i can make an reference to shdocvw.dll and created an instance of the Internet Explorer Class.
I’m able to open web pages, but it is still in an external window and i would like the page in an UIElement (like an Grid)
How do i do this ?
Are you looking for embedding the Internet Explorer COM Object directly or just a control that does that for you? The WebBrowser control will fulfill that simple plop a web browser in a Grid need. It comes standard in WPF installations and is very easy to use.
One caveat of this control is that I believe it always renders like IE7. To get it to render to a newer IE (like 11) you want to set the meta tag on the target pages like shown in the following code.
It can also be set to
IE=11explicitly. Remember to set the document types There are other ways to trigger a newer IE experience, but this by far is easiest if you control the embedded web pages.There are also third-party libraries that can give you even more functionality.