From the course: .NET MAUI Essential Training
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Displaying lists of data - .NET MAUI Tutorial
From the course: .NET MAUI Essential Training
Displaying lists of data
- [Instructor] Now I want to display a set of data. I want to display those intervals. So I'm going to get rid of this label here, and underneath my horizontal stack layout, I'm going to add a collection view. And the collection view is a very utilitarian view 'cause it allows us to do lists and grids, and it allows us to do it both vertical and horizontal. And so when we get into the items source, this is where we're going to start using data binding. I'm going to use that binding. I'm going to go to my model and use intervals. That now is the source for my collection view. So each of the intervals is going to populate an item in the collection view, and I need to define what that's going to look like. So I use collection view, item template. Then I'm going to put a data template in here. And I can then indicate how I want to lay things out. So maybe I'll do a stack layout, but of course we know, I should do a vertical stack…
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)
-
-
-