using-avalonia-collectionview

Provide filtering, sorting, and grouping collection views for AvaloniaUI MVVM apps.

40|5|Updated Dec 9, 2025
One-click install
npx skills add https://github.com/christian289/dotnet-with-claudecode --skill using-avalonia-collectionview
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-avalonia-collectionview
Source: https://github.com/christian289/dotnet-with-claudecode/tree/main/.claude/skills/using-avalonia-collectionview
Command: npx skills add https://github.com/christian289/dotnet-with-claudecode --skill using-avalonia-collectionview

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

AvaloniaUI lacks a native, unified collection view like WPF's CollectionViewSource, making it hard to implement consistent filtering, sorting, and grouping across views in MVVM apps.

Core Features & Use Cases

  • DataGridCollectionView-based service that returns an IEnumerable view for ViewModels, enabling deterministic filtering and sorting.
  • ReactiveUI-based approach with DynamicData for reactive, observable collections and simple binding in MVVM.
  • DI-friendly service layer that can be wired into Avalonia apps to expose AllMembers and ActiveMembers for binding.

Quick Start

Create the MemberCollectionService, register it in your DI container, and bind the generated views to your Avalonia UI to enable filtered and active member lists.

Frequently Asked Questions about using-avalonia-collectionview

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

FAQPage Schema
How do I implement filtering, sorting, and grouping for collections in Avalonia MVVM apps?

You can implement filtering, sorting, and grouping in Avalonia by using a dedicated collection view service that exposes an IEnumerable view, keeping ViewModels Avalonia-agnostic while supporting DataGridCollectionView or ReactiveUI-based binding.

Does Avalonia have a native CollectionViewSource like WPF for managing view data?

Avalonia lacks a native unified CollectionViewSource like WPF. To achieve consistent collection views, you need a service layer that returns DataGridCollectionView or ReactiveUI DynamicData views for clean MVVM separation.

Can I use ReactiveUI DynamicData with AvaloniaUI to handle observable collections?

Yes, ReactiveUI with DynamicData can be used in AvaloniaUI to provide reactive, observable collections. This approach enables simple MVVM binding and clean separation for filtered and active member lists.

What is the best way to keep Avalonia ViewModels decoupled from collection view logic?

The best way to decouple ViewModels is using a DI-friendly service layer that processes in-memory collections and exposes an IEnumerable view, ensuring ViewModels remain Avalonia-agnostic while binding to filtered or sorted data.

How do I set up a collection view service in Avalonia to bind active and filtered member lists?

Create a MemberCollectionService, register it in your DI container, and bind the generated views to your Avalonia UI. This enables deterministic filtering, sorting, and exposes AllMembers and ActiveMembers for binding.

DataGridCollectionView vs ReactiveUI DynamicData in Avalonia: which should I use for sorting collections?

DataGridCollectionView provides deterministic filtering and sorting returning an IEnumerable, while ReactiveUI DynamicData offers reactive observable collections. Both integrate with a DI service layer to expose views for MVVM binding.