maui-collectionview
涵盖常见列表/网格场景和性能注意点,便于构建复杂数据展示界面。
指导在 .NET MAUI 中实现 CollectionView 的布局、模板、分组、选择与增量加载等。
在 .NET MAUI 里用来显示可滚动的列表或网格数据,支持数据绑定、模板化 item、选择模式、分组、下拉刷新和增量加载等常见交互。适合替代旧的 ListView、显示大量可滚动数据或需要复杂 item 布局的场景。它的优势是布局灵活、性能更好且不依赖 ViewCell,模板和交互扩展更方便。
▸ 展开 SKILL.md 英文原文
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.
帮我安装这个 skill:https://raw.githubusercontent.com/dotnet/skills/main/plugins/dotnet-maui/skills/maui-collectionview/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/dotnet/skills/main/plugins/dotnet-maui/skills/maui-collectionview/SKILL.md"# 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 —