'How to auto update a Listview - .NET MAUI
I am making an application where there is a history and I want the history to be updated automatically when there is a change in my list. Thank you
Solution 1:[1]
Assuming you're using view models, just bind your ListView
to an ObservableCollection<T>
in the view model via the ItemsSource
dependency property - when the collection changes, the view will update as well. (And if you're not already using MVVM, I'd suggest moving to it ASAP.)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Jon Skeet |