To add a custom control to a view, we need to import a namespace to the view. If the view is in another assembly, we also need to specify the assembly, but in this case, we have both the view and the control in the same namespace, as shown in the following code:
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:controls="clr-namespace:Weather.Controls" x:Class="Weather.Views.MainView"
Follow the steps below to build the view:
- Add a Grid as the root view of the page.
- Add a ScrollView to Grid. We need this to be able to scroll if the content is higher than the height of the page.
- Add RepeaterView to ScrollView and set the direction to Column so the ...