AddSorted method for Collections #206
Panda-Sharp
started this conversation in
Ideas
Replies: 0 comments 1 reply
-
Thanks, @Panda-Sharp for the proposal and showcasing your work. @Sergio0694 what do you think about AddSorted extensions running in the ObservableGroup? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
OservableGroup and ObservableGroupCollection are really nice, but there is no easy way to keep them ordered, I implemented some simple
AddSorted
extensions methods to add the new item in the proper position and keep them ordered, they're not fully optimized yet but I think it's a good base, you can find them here:https://github.com/Panda-Sharp/Yugen.Toolkit/blob/develop/Yugen.Toolkit.Uwp/Extensions/ObservableGroupedCollectionExtensions.cs
https://github.com/Panda-Sharp/Yugen.Toolkit/blob/develop/Yugen.Toolkit.Uwp/Extensions/ObservableGroupExtensions.cs
I implemented the same extensions methods also for
ObservableCollection
, these ones works also with a comparer, herehttps://github.com/Panda-Sharp/Yugen.Toolkit/blob/develop/Yugen.Toolkit.Standard/Extensions/ObservableCollectionExtensions.cs
P.s.
The same could be done also for Lists
Cheers
Beta Was this translation helpful? Give feedback.
All reactions