C
C#2y ago
Denis

❔ ObservableCollection + multithreading

What is the proper, no bs way, to update a UI-bound collection of items from worker threads? By update, I mean CRUD from worker threads on a collection that is MVVM bound to e.g. a WPF/Avalonia/... ListView. I've found some articles that have solutions for .NET Framework, and some refer to custom-made collections... I'd like to know what is a good, production-battle-tested way of doing this (in .NET Core/.NET, of course). Thanks in advance!
3 Replies
Denis
DenisOP2y ago
DynamicData is one of the solutions I've found and used, but is there something native?
Sossenbinder
Sossenbinder2y ago
I'm no UI expert, but hearing collections and multithreading in one sentence usually makes me think of the Concurrent* collections immediately ConcurrentBag, ConcurrentQueue, ConcurrentDictionary etc
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server