The HeadlinesView is a shared view that will be used in several places in the app. The purpose of the view is to display a list of articles and to allow for navigation from one article into a web browser that will display the entire article.
Extending the HeadlinesView comes in two steps; first, we edit the XAML and define the UI, then we need to add some code to initialize it. Proceed as follows:
- In the News project, expand the Views folder and open the HeadlinesView.xaml file.
- Edit the XAML, as shown in the following code block:
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:views="clr-namespace:News.Views"
x:Name="headlinesview"
Title="Home"
x:Class="News.Views.HeadlinesView">
...