From the course: .NET MAUI Essential Training

Unlock the full course today

Join today to access over 24,600 courses taught by industry experts.

Solution: Add a collection view

Solution: Add a collection view - .NET MAUI Tutorial

From the course: .NET MAUI Essential Training

Solution: Add a collection view

(upbeat electronic music) - [Instructor] I've mentioned this before, but I want to go back and touch on it again. When we think about data binding, the UI needs to know if the model has changed and vice versa. So when we change and do these two-way binding modes, the UI, when it changes, can update the model. And that happens pretty seamlessly for us when we just use the two-way. But when our model changes, we need a way to tell the UI that happened. So I touched on this with our staggered interval model. When you have a collection of items and you want to make sure that the UI knows that you've added or removed something from that collection, so it can add or remove the visual element that it created it for that, you use observable collection of T, for this generic collection, with your type. That collection, because it's observable, knows how to notify interested parties, of which the XAML would be, if you have one…

Contents