Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Microsoft SharePoint 2010 Developer's Compendium: The Best of Packt for Extending SharePoint

You're reading from   Microsoft SharePoint 2010 Developer's Compendium: The Best of Packt for Extending SharePoint Build an engaging SharePoint site with Visual Studio, Silverlight, PowerShell and Windows 7 Phone with this book and e-book

Arrow left icon
Product type Paperback
Published in Feb 2012
Publisher Packt
ISBN-13 9781849686808
Length 392 pages
Edition 1st Edition
Arrow right icon
Toc

Table of Contents (15) Chapters Close

Microsoft SharePoint 2010 Developer's Compendium: The Best of Packt for Extending SharePoint
Credits
About the Contributors
1. www.PacktPub.com
2. Preface
1. Understanding SharePoint Development Choices 2. Building an Engaging Community Site FREE CHAPTER 3. PowerShell Scripting Methods and Creating Custom Commands 4. Integrating Silverlight 4 with SharePoint 2010 5. Interacting with Rich Media and Animations 6. List Definitions and Content Types 7. Workflows 8. Introduction to Programming Windows Phone 7 with the SharePoint Client Services 9. Building SharePoint Pages for Windows Phone 7 10. Building a Windows Phone 7 Dashboard Application with SharePoint Data

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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image