I want to display some HTML content in my WP7 application. I use the WebBrowser and it works very well. However, my WebBrowser is inside a ScrollViewer because I have some contents that are not HTML in the same page. So, I made my WebBrowser not scrollable and with a fixed height. But the control can't be higher than 2048px and I have some contents that are more than that. Therefore, it doesn't show the entire page and the text is cut. Here is the code :
<ScrollViewer>
<StackPanel Orientation="Vertical">
<Image Height="240" HorizontalAlignment="Center" Stretch="{Binding ImageStretch}" Width="Auto" Source="{Binding Image}" />
<TextBlock Text="{Binding Credit}" TextTrimming="WordEllipsis" />
<TextBlock Text="{Binding Description}" TextWrapping="Wrap" IsHitTestVisible="False" />
<phone:WebBrowser Width="Auto" IsScriptEnabled="True" ScriptNotify="WebBrowserScriptNotify" IsHitTestVisible="False" />
</StackPanel>
And here is a screenshot of the problem:
So, is there any alternative to the WebBrowser control or is there a workaround ?
Thank you
There is no alternative as far as I know, however, the solution to this similar question includes a simple algorithm for converting HTML into TextBlocks:
HTMLTextBlock for Windows Phone 7
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With