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 - .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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Data binding basics4m 33s
-
(Locked)
Displaying lists of data4m 53s
-
(Locked)
Displaying data in a grid4m 5s
-
(Locked)
Binding data for input6m 57s
-
(Locked)
Databinding configuration8m 42s
-
(Locked)
Change notifications2m 24s
-
(Locked)
Additional views1m 26s
-
(Locked)
Challenge: Add a collection view2m 58s
-
(Locked)
Solution: Add a collection view8m 9s
-
(Locked)
-
-
-