maui-collectionview

Implements CollectionView lists and grids in .NET MAUI apps with XAML and C#.

1|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/D1ssolve/craft-agents --skill maui-collectionview-d1ssolve
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: maui-collectionview
Source: https://github.com/D1ssolve/craft-agents/tree/main/skills/maui-collectionview
Command: npx skills add https://github.com/D1ssolve/craft-agents --skill maui-collectionview-d1ssolve

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building scrollable, data-bound lists and grids in .NET MAUI requires correct use of CollectionView layouts, templates, selection, grouping, and virtualization, and mistakes like using ViewCell or List<T> cause crashes and stale UIs. ## Core Features & Use Cases - Layouts and Templates: Configure vertical/horizontal lists and grids with GridItemsLayout, DataTemplate with compiled bindings, and item sizing strategies. - Interaction Patterns: Implement single/multiple selection with visual states, grouping with headers, pull-to-refresh via RefreshView, swipe actions, and incremental loading. - Use Case: You are building a product catalog page in a .NET MAUI app and need a two-column grid with pull-to-refresh, infinite scroll, and an empty state when no products match the search. ## Quick Start Ask the agent to create a .NET MAUI CollectionView page that displays an ObservableCollection of items in a two-column grid with pull-to-refresh and an empty view.

Frequently Asked Questions about maui-collectionview

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a grid layout with CollectionView in .NET MAUI?

Set ItemsLayout to a GridItemsLayout with Orientation and Span properties, for example Span="2" for two columns. Bind ItemsSource to an ObservableCollection and define item appearance with a DataTemplate using x:DataType for compiled bindings.

How to add pull-to-refresh to a .NET MAUI CollectionView?

Wrap the CollectionView in a RefreshView and bind its IsRefreshing property and Command to your ViewModel. Set IsRefreshing back to false in the ViewModel when the refresh operation completes.

CollectionView vs ListView in .NET MAUI, which should I use?

CollectionView replaces ListView and should be used for all scrollable data lists. It offers better performance, flexible list and grid layouts, and does not require ViewCell, using any View or Layout as the item template root.

Why does my CollectionView not update when items change?

The ItemsSource must be an ObservableCollection<T>, not a List<T>, so the UI receives change notifications on add and remove. Collection updates must also run on the UI thread via MainThread.BeginInvokeOnMainThread.

Why does incremental loading fire endlessly in CollectionView?

RemainingItemsThreshold-based loading requires a virtualizing layout such as LinearItemsLayout or GridItemsLayout. Using a StackLayout with BindableLayout has no virtualization, which causes the threshold event to fire continuously.

When should I not use CollectionView in .NET MAUI?

Avoid CollectionView for static layouts with a fixed number of items, where Grid or StackLayout is simpler. Also use Microsoft.Maui.Controls.Maps for map pin lists and standard form controls for table-based data entry.