The ContentView of the ArticleItem represents one item in a list of news, as the following screenshot illustrates:
To create this layout, we will use a Grid control. Follow these steps to create the layout needed:
- In the News project, expand the Views folder and open the ArticleItem.xaml file.
- Edit the XAML code, as shown in the following code block:
<?xml version="1.0" encoding="UTF-8"?>
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="News.Views.ArticleItem">
<Grid Margin="0">
<Grid.RowDefinitions>
<RowDefinition Height="10" />
<RowDefinition Height="40" />
<RowDefinition Height="15" />
<RowDefinition Height="10" />
<RowDefinition Height="1" />
<...