question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WPF Gap: CollectionViewSource doesn't support all WPF scenarios

See original GitHub issue

Proposal: CollectionViewSource doesn’t support all WPF scenarios

Summary

The CollectionViewSource in UWP is inferior to the one in WPF doc here.

The WPF one supports live filtering, grouping, and sorting all out of the box. The UWP one does not. ☹

For instance, this DataGrid grouping scenario is not easily achievable in UWP.

Rationale

Creating sorted, grouped, and/or filtered lists in UWP is a pain, especially trying to combine any combination of these. The CollectionViewSource is supposed to be this abstraction above the data layer itself. UWP/WinUI should provide a first/best-in-class solution to these common scenarios and match or improve upon the WPF APIs.

Scope

Capability Priority
Allow (Live) Grouping Must
Allow (Live) Sorting Must
Allow (Live) Filtering Must
Allow any combination of the three to work in tandum together Must
Able to configure CVS in XAML Should

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:17
  • Comments:9

github_iconTop GitHub Comments

2reactions
kateryna-novakcommented, Dec 8, 2022

@kateryna-novak if you just need grouping, there’s the ObservableGroup option as well as shown in the MVVM Toolkit app Collection sample: https://aka.ms/mvvmtoolkit/app

@michael-hawker I need filtering and grouping. That’s why I’m asking.

2reactions
michael-hawkercommented, Jun 23, 2022

@LadderLogic I own the Windows Community Toolkit, so I don’t know if there’s plans on the WinUI side to work on this in the near future or not. I don’t think @anawishnoff is the correct owner for this anymore, @gabbybilka who should own this now?

We have an AdvancedCollectionView in the Toolkit, but it doesn’t cover all the scenarios currently (thus why I opened this issue for tracking with the platform).

I’m not too sure where our gaps lie currently as we have some other helpers we’ve developed since for grouping scenarios. We want to improve our samples more later this year with our next release, so we’ll have a better understanding then. I know @Sergio0694 has been making some examples of these scenarios for the MVVM Toolkit Samples, but not sure if they’re merged into main yet or just in a PR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - CollectionViewSource binding doesn't work with ...
The problem is that when I navigate away from and then back to the page, the items list refreshes and the scroll position...
Read more >
Customize Data Display with Data Binding and WPF
SelectNodes does not currently support the use of XPath functions, WPF data binding does not support them either.
Read more >
Untitled
Wpf collectionviewsource xaml CollectionViewSource ItemsPath binding not ... Proposal: CollectionViewSource doesn't support all WPF scenarios Summary.
Read more >
Untitled
Wpf collectionviewsource grouping example Filtering, Sorting, ... 2021 · Proposal: CollectionViewSource doesn't support all WPF scenarios Summary.
Read more >
WPF ItemsControl – Advanced
This article talks about advanced topics in WPF ItemsControl such as grouping and custom layouts.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found