O'Reilly logo

Real World .NET 4, C#, and Silverlight®: Indispensible Experiences from 15 MVPs by Daron Yöndem, Christian Weyer, Christian Nagel, Scott Millett, Jeremy Likness, Vishwas Lele, Jeffrey Juday, Caleb Jenkins, Kevin Grossnicklaus, Alex Golesh, David Giard, Gill Cleeren, György Balássy, Dominick Baier, Bill Evjen

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

13

Practical WPF Data Binding

by Christian Nagel

This chapter provides practical information on data binding with Windows Presentation Foundation (WPF). It leads you on a journey to see various aspects of data binding and how you can use it. Simple object binding, as well as list binding (including validation and how to deal with large lists), are explained. Don't expect to see cool user interfaces (UIs) with WPF in this chapter. The UI is kept simple. Various features of WPF for styling, animations, and three dimensional (3D) are not discussed. This chapter focuses only on data binding with WPF.

SAMPLE APPLICATION

The sample application used in this chapter is based on a Formula 1 database. Instead of just binding to in-memory data, a database with several tables and thousands of rows demonstrates data-binding features. You can download the database, along with the sample code for this chapter, on this book's companion website (www.wrox.com).

The database contains information about Formula 1 racers, circuits, and race results. With the application, racers can be queried and changed, and race results can be added.

Figure 13-1 shows the database structure. The Circuits table contains information about all Formula 1 circuits that have been raced on. You can find the race date for circuits in the Races table. Each record in the Races table connects to a list of records in RaceResults. An entry in RaceResults contains a link to one record in the Racers table and one record in the ...

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