Using RepeaterView

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:

  1. Add a Grid as the root view of the page.
  2. Add a ScrollView to Grid. We need this to be able to scroll if the content is higher than the height of the page.
  3. Add RepeaterView to ScrollView and set the direction to Column so the ...

Get Xamarin.Forms Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.