Chapter 3: Data Binding in WPF

In This Chapter

check.png Understanding dependency properties

check.png Working with binding modes

check.png Defining an example binding object

check.png Making sense out of data

Data binding allows data from your application objects (the binding source) to be displayed in your user interface elements (the binding target). What this means is that you can bind a Textbox’s Text property (for example) to the Name property of an instance of your Car class. Depending on the binding mode used when setting up the relationship, changes in the Text property value of the Textbox can automatically update the underlying Name property of your Car object (and vice versa) without requiring any additional code.

It’s no mystery these days that most applications deal with data. As a WPF developer, you have full creative reign on how data is presented and how information entered by your user can be validated and used to update your underlying objects. One of WPF’s strengths is its rich data binding support. This chapter walks you through the details.

Getting to Know Dependency Properties

Data binding happens ...

Get C# 5.0 All-in-One For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.