Tag Archives: webview

WebView Workarounds

Metro WebView Source and HTML workarounds

WebView Workarounds

In the process of writing my first Windows 8 Metro style app using C# and XAML, I came across some limitations of the current WebView control’s implementation.  The flow for the feature I was working on is fairly simple:

  1. Content for a webpage is displayed in a WebView (using the WebView’s Source property).
  2. User browses the page until they find something they want to save.
  3. User clicks a save button and the app parses the information into a readable format for saving in the app’s storage.

This is a pretty straightforward concept and I thought the implementation would be just as intuitive. Judging by the similarity of the WebView control to the Silverlight WebBrowser control, I went about implementing this functionality as I would have for Silverlight.  I set the WebView’s Source property to the initial Uri where I wanted the browsing to begin.  I wired up a test button that I thought would kick off the parsing process.  That’s when I started to run into problems.

Continue reading