-->

WP7 Emulator Browser not displaying anything

2020-07-12 07:29发布

问题:

I use the webbrowser control to display a webpage from an application, but it just displayed a white screen. I tried Internet Explorer and it did not display anything either. Any ideas how to fix this problem.

Thanks a lot in advance.

回答1:

Windows Phone Emulator requires a DirectX 10 or above capable graphics card with a WDDM 1.1 driver. I assume that you got an error message on first start of the emulator that your graphic adapter isn't capable for all functions the emulator is using and that this may impact XNA games and sometimes silverlight like this one:

If your graphic adapter does not fully support DirectX 10 or doesn't has a WDDM 1.1 driver you will only see a white screen instead of the rendered webpage. This also affects all controls using MultiScaleImage, including the webbrowser control. As far as I know there is no solution for this at the moment.

To check if the emulator is running the required GPU emulation take a look at the arrow to open the application list and if it points to the right or left. If it points to the left, NO GPU is available - if it points to the right (as on the hardware phone itself) the GPU is available and rendering should work as expected.

See also this page in the msdn.



回答2:

You haven't said if you're testing a local/private page or one on the web.

Also test other pages on the web. Can you view anything or just your own page.

If you can't see pages on the public web then you have a networking issue

If you can see public pages but not locally hosted ones then you probably have a different networking issue. If you're on an actual device or the emulator will likely greatly affect this.

The other things it may are:

  • you're trying to view a page that is to compilcated to be displayed (if there is such a thing - test with a very simple static page first)
  • the page uses useragent detecction and doesn't recognise the user agent and so is serving nothing
  • the page has complex javascript which runs before the page is rendered and the javascript is failing and so the page is never displayed.