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

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…

Contents