In Xamarin.Forms, we can use CollectionView or ListView if we want to show a collection of data. Using both CollectionView and ListView works great in most cases, and we will use CollectionView later in this chapter, but ListView can only show data vertically. In this app, we want to show data in both directions. In the vertical direction, we will have the days (we group forecasts based on days), while in the horizontal direction, we will have the forecasts within a particular day. We also want the forecasts within a day to wrap if there is not enough space for all of them in one row. CollectionView can show data in a horizontal direction, but it will not wrap. With FlexLayout, we are able to add items in both directions and we can use BindableLayout to bind items to it. When we are using BindableLayout, we will use ItemSource and ItemsTemplate as attached properties.
Perform the following steps to build the view...