Home > Software engineering >  How to auto update a Listview - .NET MAUI
How to auto update a Listview - .NET MAUI

Time:05-16

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

CodePudding user response:

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.)

  • Related