From the course: .NET MAUI Essential Training
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Databinding configuration - .NET MAUI Tutorial
From the course: .NET MAUI Essential Training
Databinding configuration
- [Instructor] We're going to make some updates to our bindings here and we're going to do that in two steps. Step one, we're going to fix the model to get rid of this TimeSpan so we're not binding to a path of period. And step two is we're going to introduce a converter to convert between TimeSpans and strings. So let's go to our StaggeredIntervalModel here. Remember we have our durations that are of type TimeSpan and we have a TotalDuration that essentially sums those up. So I'm just going to add a new class here real quick. We'll call it IntervalDuration. I'm going to put a property on it. We'll make that a TimeSpan and we'll call that Duration. Now we'll use this IntervalDuration instead of TimeSpan in a number of places. So we're going to change our collection here to those and we're going to have to change our sum so that we use that duration property now to get at the TimeSpan tick. Another important piece of our data…
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)
-
-
-