I have a WebBrowser control that’s loaded with a local HTML file, like so:
var rs = Application.GetResourceStream(new Uri("View/Help.html", UriKind.Relative));
StreamReader reader = new StreamReader(rs.Stream);
browser.NavigateToString(reader.ReadToEnd());
reader.Close();
It displays fine, except the last two lines are cropped off. It’s like the viewport of the WebBrowser isn’t large enough (I can pull up and see the last two lines, but when I let go it bounces back down). The HTML file is fairly long, maybe 5 screens worth.
The XAML for the page is super simple, the entire page is the WebBrowser control:
<Grid x:Name="LayoutRoot" Background="Transparent">
<phone:WebBrowser x:Name="browser" Width="480" Height="800" IsScriptEnabled="True"/>
</Grid>
Any ideas?
If you’ve got the
ApplicationBarvisible then you’ll need to reduce the size of yourWebBrowserotherwise you’ll be displaying content underneath the app bar.