maui-collectionview

Featured

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 463 stars 35 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 94/100

Stars 20%
89
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
managedcode
Repository
managedcode/dotnet-skills
Created
4 months ago
Last Updated
3 days ago
Language
C#
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Web & Frontend Solid

using-avalonia-collectionview

Provides CollectionView alternatives for AvaloniaUI using DataGridCollectionView and ReactiveUI. Use when filtering, sorting, or grouping collections in AvaloniaUI applications.

40 Updated 1 weeks ago
christian289
Data & Documents Featured

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).

463 Updated 3 days ago
managedcode
Web & Frontend Featured

maui

Build, review, or migrate .NET MAUI applications across Android, iOS, macOS, and Windows with correct cross-platform UI, platform integration, and native packaging assumptions. USE FOR: working on cross-platform mobile or desktop UI in .NET MAUI; integrating device capabilities, navigation, or platform-specific code; migrating Xamarin.Forms or aligning. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.

463 Updated 3 days ago
managedcode