maui-collectionview

Implement MAUI CollectionView lists and grids with XAML, bindings, grouping, and layouts.

Updated Apr 21, 2026
One-click install
npx skills add https://github.com/snailb1007/snail-codex-skills --skill maui-collectionview-snailb1007
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: maui-collectionview
Source: https://github.com/snailb1007/snail-codex-skills/tree/main/skills/maui-collectionview
Command: npx skills add https://github.com/snailb1007/snail-codex-skills --skill maui-collectionview-snailb1007

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

MAUI developers need a clear guide to implementing CollectionView for lists and grids, including best practices for data binding, item templates, and interactions.

Core Features & Use Cases

  • Basic setup: Bind an ItemsSource to a collection and define an ItemTemplate with a compiled binding using x:DataType, ensuring you don't use ViewCell.
  • Pull-to-refresh and incremental loading: Wrap in RefreshView and enable incremental loading with RemainingItemsThreshold.
  • Advanced layouts and selection: Use GridItemsLayout / LinearItemsLayout with selection support and SnapPoints for smooth scrolling; handle grouped data and headers if needed.
  • Common gotchas: Avoid using StackLayout-based layouts for virtualization; ensure update on UI thread.

Quick Start

Create a CollectionView bound to an ObservableCollection and enable a simple item template with a selection highlight.

Frequently Asked Questions about maui-collectionview

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

FAQPage Schema
How do I implement pull-to-refresh and incremental loading in a MAUI CollectionView?

Implement pull-to-refresh in a MAUI CollectionView by wrapping it in a RefreshView, and enable incremental loading by setting the RemainingItemsThreshold property to trigger data fetching as the user scrolls.

What is the best way to bind data and define item templates in a MAUI CollectionView?

The best way to bind data in a MAUI CollectionView is setting an ObservableCollection to the ItemsSource and using an ItemTemplate with compiled bindings via x:DataType, ensuring you do not use ViewCell.

How do I create a grid layout with selection support in MAUI CollectionView?

Create a grid layout in a MAUI CollectionView by assigning a GridItemsLayout, enabling selection properties, and configuring SnapPoints for smooth scrolling interactions within the XAML definition.

Why does my MAUI CollectionView lose virtualization and scroll poorly?

A MAUI CollectionView loses virtualization and scrolls poorly when using StackLayout-based layouts for items; you should use proper layout components and ensure item updates occur on the UI thread.

Can I display grouped data with headers in a MAUI CollectionView?

Yes, you can display grouped data with headers in a MAUI CollectionView by configuring the grouping behavior in your XAML and binding the grouped collection to the ItemsSource property.

How do I show an empty view when a MAUI CollectionView has no items?

Show an empty view when a MAUI CollectionView has no items by defining the EmptyView property in XAML, which renders the specified content automatically when the bound ItemsSource is empty.