Using the WebBrowser control to display the post
We have come a long way, but we aren't quite finished yet. There's one little thing left to do. The details view page is a bit bland. What we want to do next is open the post in a web browser, so that we can view the real details. To do this, we need to do the following two things:
Add a WebBrowser to the details view
Navigate the WebBrowser to the post's URL
Adding a WebBrowser to the details view
Open the file DetailsView.xaml
and find ContentPanel
. Within this grid, add the following XAML:
<phone:WebBrowser x:Name="browser" HorizontalAlignment="Stretch" />
This adds a WebBrowser control named browser
to the content panel. It is important to give the Web browser a width by either directly specifying a width or setting HorizontalAlignment
to stretch, as we've done here. If we don't give the browser a width, the details page will appear blank.
While we are in the XAML, let's change ApplicationTitle and PageTitle to CHAPTER...