Elmish.WPF icon indicating copy to clipboard operation
Elmish.WPF copied to clipboard

Introduce a new binding for grouped list?

Open Evangelink opened this issue 4 years ago • 2 comments
trafficstars

I have started to need to implement some grouped lists and so far I have used (rightly or wrongly) two patterns:

  1. Use Binding.subModelSeq and use a CollectionViewSource in XAML.

  2. Use Binding.oneWay (I think I can rewrite it to the the subModelSeq) and do a grouping in the code. This seems like a better choice when I need to do more complex operations.

I am wondering if it would be useful to have some specific function/overload for this use-case? Or maybe I am just doing it wrong and there is already a good and easy way.

Evangelink avatar Feb 17 '21 17:02 Evangelink

Can you share a specific example that is implemented twice: once for each pattern?

I would describe the API in 3.x as having methods to create a binding with a specific set of effects for specific use cases. I am trying to expose all of those same effects in a composable way for the API in 4.x. There is a prerelease available on nuget that has some of those effects. See the release notes for which ones. Have you tried it? The master branch has some additional binding effects that are not yet available in a prerelease. See the release notes again for which ones.

In any case, I want it to be easy for you to create a binding that exactly has the behavior you want. I am still not sure that behavior is right now. I am looking forward to trying your examples.

TysonMN avatar Feb 17 '21 19:02 TysonMN

Are you still interested in this? If so, can you share some examples?

TysonMN avatar Jun 15 '22 04:06 TysonMN