maui-collectionview

Solid

Guidance for implementing CollectionView in .NET MAUI apps — data display, layouts (list & grid), selection, grouping, scrolling, empty views, templates, incremental loading, swipe actions, and pull-to-refresh. USE FOR: "CollectionView", "list view", "grid layout", "data template", "item template", "grouping", "pull to refresh", "incremental loading", "swipe actions", "empty view", "selection mode", "scroll to item", displaying scrollable data, replacing ListView. DO NOT USE FOR: simple static layouts without scrollable data (use Grid or StackLayout), map pin lists (use Microsoft.Maui.Controls.Maps), table-based data entry forms, or non-MAUI list controls.

Web & Frontend 3,219 stars 238 forks Updated today MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# CollectionView — .NET MAUI `CollectionView` is the primary control for displaying scrollable lists and grids of data in .NET MAUI. It replaces `ListView` with better performance, flexible layouts, and no `ViewCell` requirement. ## When to Use - Displaying a scrollable list or grid of data items - Binding a collection of objects to a templated item layout - Adding selection (single or multiple), grouping, or pull-to-refresh - Implementing infinite scroll / incremental loading - Showing swipe actions on list items - Displaying an empty state when no data is available ## When Not to Use - Static layouts with a fixed number of items — use `Grid` or `StackLayout` directly - Map pin lists — use the `Microsoft.Maui.Controls.Maps` NuGet package - Table-based data entry forms — use standard form controls - Simple text-only lists with no interaction — consider `BindableLayout` on a `StackLayout` ## Inputs - A data source (typically `ObservableCollection<T>`) bound to `ItemsSource` - A `DataTemplate` defining how each item renders - Optional: layout configuration, selection mode, grouping model, empty view ## Basic Setup ```xml <CollectionView ItemsSource="{Binding Items}"> <CollectionView.ItemTemplate> <DataTemplate x:DataType="models:Item"> <HorizontalStackLayout Padding="8" Spacing="8"> <Image Source="{Binding Icon}" WidthRequest="40" HeightRequest="40" /> <Label Text="{Binding Name}" VerticalOptions="Center" /> ...

Details

Author
dotnet
Repository
dotnet/skills
Created
3 months ago
Last Updated
today
Language
C#
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Data & Documents Solid

maui-data-binding

Guidance for .NET MAUI XAML and C# data bindings — compiled bindings, INotifyPropertyChanged / ObservableObject, value converters, binding modes, multi-binding, relative bindings, fallbacks, and MVVM best practices. USE FOR: setting up compiled bindings with x:DataType, implementing INotifyPropertyChanged or CommunityToolkit ObservableObject, creating IValueConverter / IMultiValueConverter, choosing binding modes, configuring BindingContext, relative bindings, binding fallbacks, StringFormat, code-behind SetBinding with lambdas, and enforcing XC0022/XC0025 warnings. DO NOT USE FOR: CollectionView item templates and layouts (use maui-collectionview), Shell navigation data passing (use maui-shell-navigation), dependency injection (use maui-dependency-injection), or animations triggered by property changes (use .NET MAUI animation APIs).

3,219 Updated today
dotnet
Data & Documents Listed

data-display-and-selection

Complex data deserves multiple view modes — grid, list, table — chosen by the user based on their task. Row and item selection should use large hit areas (the whole row or card, not just a checkbox). Selected state is communicated through a subtle background colour shift. Mass actions appear when items are selected. Use when designing data tables, product listings, file browsers, or any multi-item collection.

13 Updated yesterday
dembrandt
Web & Frontend Listed

swiftui-layout-components

Build SwiftUI layouts using stacks, grids, lists, scroll views, forms, and controls. Covers VStack/HStack/ZStack, LazyVGrid/LazyHGrid, List with sections and swipe actions, ScrollView with ScrollViewReader, Form with validation, Toggle/Picker/Slider, .searchable, and overlay patterns. Use when building data-driven layouts, collection views, settings screens, search interfaces, or transient overlay UI.

661 Updated 4 days ago
dpearson2699
AI & Automation Solid

swiftui-patterns

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

201,447 Updated yesterday
affaan-m
Web & Frontend Solid

maui-theming

Guide for theming .NET MAUI apps — light/dark mode via AppThemeBinding, ResourceDictionary theme switching, DynamicResource bindings, system theme detection, and user theme preferences. Use when: "dark mode", "light mode", "theming", "AppThemeBinding", "theme switching", "ResourceDictionary theme", "dynamic resources", "system theme detection", "color scheme", "app theme", "DynamicResource". Do not use for: localization or language switching (see .NET MAUI localization documentation), accessibility visual adjustments (see .NET MAUI accessibility documentation), app icons or splash screens (see .NET MAUI app icons documentation), or Bootstrap-style class theming (see Plugin.Maui.BootstrapTheme NuGet package).

3,219 Updated today
dotnet