This page only has one purpose, and that is to display the web page from the URL that we passed to it. Let's add a WebView control to the page, as follows:
- In the News project, expand the Views folder and open ArticleView.xaml.
- Add the following XAML marked in bold:
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="News.Views.ArticleView">
<ContentPage.Content>
<WebView Source="{Binding .}" />
</ContentPage.Content>
</ContentPage>
The WebView control will take up all available space in the view and the source will be set to "." , meaning that it will be the same as the BindingContext property of the ViewModel. The BindingContext property, in this case, is a UrlWebViewSource...