Any way to set the WP7 Webbrowser control height Dynamically and lock scrolling?
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, O开发者_如何学运维nce it's displayed properly, I don't want it to scroll, as the user can scroll it completely off the screen.
Any ideas?
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.
精彩评论