I’m creating an app on Windows Phone 7 that lets folks read offline HTML content. Is there a way to show an inline browser or HTML viewing control?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
WebBrowsercontrol allows you to display arbitrary HTML.There are two methods on the
WebBrowsercontrol you can use to display HTML:Navigate()will display the contents of a file located at the supplied URL. This file can be inIsolatedStorageor on a server.NavigateToString()will display the html string you give it.In your case I’m guessing you’d use a
WebClientobject to download the webpage to offline storage, then theNavigatemethod to display it.However, the benefit of
NavigateToStringis that you can munge the string on the way in to do some cool (or essential) stuff like style the page so it matches perfectly with the current phone theme, or catch all link clicks and make them pop in the external browser (otherwise they load in the very sameWebBrowsercontrol).I’ve documented the details of styling and link clickery here.