maui-collectionview

Implement .NET MAUI CollectionView lists and grids with DataTemplate binding.

1|Updated May 21, 2026
One-click install
npx skills add https://github.com/1k-off/umbraco-observability-playground --skill maui-collectionview-1k-off
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: maui-collectionview
Source: https://github.com/1k-off/umbraco-observability-playground/tree/main/.agents/skills/maui-collectionview
Command: npx skills add https://github.com/1k-off/umbraco-observability-playground --skill maui-collectionview-1k-off

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you implement efficient, data-driven CollectionView interfaces in .NET MAUI so your apps can display scrollable lists and grids reliably with correct templates, selection, grouping, and empty/loading states.

Core Features & Use Cases

  • Data display with templates: Bind ItemsSource to a collection and render each item with a DataTemplate (without using ViewCell) for better performance and maintainable UI.
  • Layouts for lists and grids: Switch between VerticalList/HorizontalList and GridItemsLayout configurations (including spacing and spans) for tailored presentation.
  • Interaction patterns: Enable selection modes, group headers, swipe actions, headers/footers, scrolling behaviors, pull-to-refresh, and incremental loading for a complete user experience.
  • Empty state handling: Provide EmptyView (including custom EmptyView wrapped in ContentView) to gracefully handle no-data scenarios.

Quick Start

Implement a .NET MAUI CollectionView bound to an ObservableCollection with an ItemTemplate and a supported ItemsLayout (for example VerticalList or a GridItemsLayout) while avoiding ViewCell.

Frequently Asked Questions about maui-collectionview

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

FAQPage Schema
How do I bind data to a .NET MAUI CollectionView using XAML?

To bind data to a .NET MAUI CollectionView, set the ItemsSource property to an ObservableCollection and define an ItemTemplate using a DataTemplate without ViewCell for efficient templated rendering.

Can I create a grid layout with .NET MAUI CollectionView?

Yes, you can create a grid layout in a .NET MAUI CollectionView by configuring GridItemsLayout with appropriate spans and spacing, switching from default VerticalList or HorizontalList orientations.

What is the best way to handle empty states in a MAUI CollectionView?

The best way to handle empty states in a MAUI CollectionView is providing an EmptyView, which can be a custom ContentView, to gracefully display UI when the bound ItemsSource collection has no data items.

Does .NET MAUI CollectionView support swipe actions and pull-to-refresh?

Yes, .NET MAUI CollectionView supports swipe actions and pull-to-refresh natively, enabling interactive list items alongside incremental loading for seamless infinite scroll data fetching behaviors.

Why does my MAUI CollectionView throw an error when using ViewCell?

A .NET MAUI CollectionView throws errors with ViewCell because it requires DataTemplate directly without ViewCell wrappers, unlike the older ListView, ensuring better rendering performance and maintainable XAML structure.

How do I implement grouping and headers in a .NET MAUI CollectionView?

To implement grouping and headers in a .NET MAUI CollectionView, configure the ItemsSource with grouped data and define appropriate DataTemplate structures, adding headers and footers for complete user interface presentation.