2

I'm trying to get the screenshot of a given URL as a bitmap image on the Windows Phone. The WebBrowser class does not seem to have the DrawToBitmap method.

Any pointers on how to get this working?

thunderboltz
  • 3,387
  • 3
  • 21
  • 20

2 Answers2

3

Use WriteableBitmap to render the WebBrowser control and its contents to a bitmap as described by Laurent's article Taking a screenshot from within a Silverlight #WP7 application, which also explains how to save it to the media library.

Derek Lakin
  • 16,179
  • 36
  • 51
  • 1
    The article mentions that it doesnt work on the contents of a WebBrowser Control. That is exactly what I wanted to do... – thunderboltz Feb 13 '11 at 07:23
1

You can't take a screenshot of the WebBrowser Control as there seems to be a bug with the way it works with WriteableBitmaps. An alternative method could be to send the URL to a web service which takes a screenshot on the server and returns it back to your app.

keyboardP
  • 68,824
  • 13
  • 156
  • 205