O'Reilly logo

SilverlightTM 4 Problem — Design — Solution by Nick Lecrenski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Time to Hit the Gym

Creating the Exercise Log

Thanks to the hard work you put in during the previous chapter, users of FitnessTrackerPlus can now keep track of the foods they eat on a daily basis. Now you want to provide them with an easy way to keep track of their exercise routines. Like the food log page you will need to design a user interface that is conducive to logging exercises. This means that the controls used for the food log page may not be the ones best suited for logging exercises. So you will need to design the user interface accordingly.

The information that is logged when creating exercise log entries can vary depending on the type of exercise performed. When logging cardio exercises, users will want to keep track of things such as speed, distance, duration, and so on. However, when logging weight training exercises, users will most likely only care about things such as total repetitions and weight of the exercise performed. For this reason, you will be making use of separate DataGrid controls for each exercise type when displaying entries.

You will see how to make use of the new DomainDataSource control included in the WCF RIA Services Framework to coordinate operations between each of these DataGrid controls as well as filtering the entries being displayed so that cardio exercises appear in one DataGrid and weight training exercises appear in another. You will also see how to take advantage of the grouping and sorting features of the DomainDataSource controls ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required