.NET MAUI › Controls & Views

How do you display a scrollable list of items?

Beginner

Answer

Use CollectionView, MAUI's performant, virtualized list control. Bind ItemsSource to a collection and define an ItemTemplate with a DataTemplate. CollectionView supports linear and grid layouts, grouping, selection modes, and empty views, and replaces the older, heavier ListView.
<CollectionView ItemsSource="{Binding Items}">
    <CollectionView.ItemTemplate>
        <DataTemplate>
            <Label Text="{Binding Name}" Padding="12" />
        </DataTemplate>
    </CollectionView.ItemTemplate>
</CollectionView>
Real-world example A product catalog binds 5,000 items to a CollectionView that scrolls smoothly thanks to UI virtualization.

Common follow-ups: Why prefer CollectionView over ListView? | How do you template items?