dotnet / Comet

Comet is an MVU UIToolkit written in C#
MIT License
1.64k stars 116 forks source link

Is it possible to rerender a view when a Observable collection gets changed? #259

Closed ziaulhasanhamim closed 2 years ago

ziaulhasanhamim commented 2 years ago

I have a collection that is rendered directly inside a scroll view without using a list view(Because scrolling is a lot laggier in a list view than direct rendering with LINQ or for-loop. Also, it takes a huge time to add something to the list view. In simple words ListView wasn't usable for me). But I need to rerender the view when the Observable collection gets changed. Is there a way to do that? Using Linq or for loop, I get a very very smooth scrolling experience well above my expectations.

Clancey commented 2 years ago

Out of the box, a List Will listen to OBservableCollection, But no other classes. You could easily listen to the changes and call View.Reload(), whenever the collection changes though!

ziaulhasanhamim commented 2 years ago

Thanks for helping out