The app will eventually display a list of articles where each article will be rendered using a reusable component. We will call this reusable component ArticleItem. In Xamarin.Forms, a reusable component is called a ContentView. Please don't confuse this with an MVVM View, which is represented by a page in Xamarin.Forms. We know that this is confusing, but the rule is that a Xamarin.Forms page is an MVVM View and a Xamarin.Forms Content View is essentially a reusable control.
That said, let's create the ArticleItem class, as follows:
- In the News project, right-click the Views folder, select Add, and then click New Item... .
- Under the Visual C# Items node on the left, select Xamarin.Forms.
- IMPORTANT: Make sure that you select the Content View template in the next step and NOT the Content Page template.
- Select Content View (important, remember?) and name it ArticleItem.
- Click Add to create the view.
Refer to the following...