4

I need to display a html string in a WebBrowser control, but it can be of variable length, and isn't the only thing on the screen. So, I need to be able to set the width corresponding to the actual content of the message.

WebBrowser has the property ActualHeight, but that does not produce any results. Additionally, Once it's displayed properly, I don't want it to scroll, as the user can scroll it completely off the screen.

Any ideas?

William Melani
  • 4,270
  • 1
  • 21
  • 44

1 Answers1

3

I'm not 100% sure what you need.

But you can use: - normal XAML to set the external height and width of the webbrowser - some header tags to achieve some fixing of the web-browser's client height and width - see http://blogs.msdn.com/b/mikeormond/archive/2010/12/16/displaying-html-content-in-windows-phone-7.aspx including the comments at the bottom

I've done some of tis in the editor for iron7 - this fixes the client scale and disables zooming - but it's still got some unwanted side effects.

Hopefully the upcoming WP7 releases - including IE9 "soon" - will make the web browser control much better.

Stuart
  • 66,722
  • 7
  • 114
  • 165