maui-collectionview

仓库创建 2026年2月4日最近提交 18 小时前SkillHot 收录 20 天前
▸ 精选理由

涵盖常见列表/网格场景和性能注意点,便于构建复杂数据展示界面。

这个 Skill 做什么

指导在 .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.

开发编程集合视图UI 组件MAUI通用
4.8k
Stars
351
Forks
40
仓库内 Skill
+610
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/dotnet/skills/main/plugins/dotnet-maui/skills/maui-collectionview/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/dotnet/skills/main/plugins/dotnet-maui/skills/maui-collectionview/SKILL.md"
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 —
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有