Webbrowser documenttext not updating

Posted by / 22-Feb-2016 15:32

Another workaround is not to use the extension “.htm” or “.html” when calling . The web browser control will refuse to render any local images and only display placeholder if the HTML is set via the Document Text properly.

Strangely it will display remote images from a web server. All the above seemingly trivial problems are just making life harder for the Windows Mobile developers.

Since this is a WPF app, I now convert it back to a WPF Image, and raise the event.

If I failed in any way the event fires with a null image.

I Spent several hours playing around and searching for a solution online, and couldn’t find any valid solution for my case.

If I got it I’ll create graphics and Draw it on the bitmap (that’s the method signature defined below on line 132 ).

The WPF one simply never fires an event back when it’s ready in this case.

Line 45: I made navigate a separate method to avoid timing issues in hooking up the Web Browser Image Ready event. The browser is disposed after the first navigation.

It’s really up to the implementer to pick what suits his application.

I’m attaching the full code below, here is some explanations on how it works and how to use it. Add a reference to mshtml it’s going to appear in the COM section in VS2010 2.

webbrowser documenttext not updating-47webbrowser documenttext not updating-77webbrowser documenttext not updating-58

One thought on “webbrowser documenttext not updating”