8.1. Binding Elements Together

The simplest data binding scenario occurs when your source object is a WPF element and your source property is a dependency property. That's because dependency properties have built-in support for change notification, as explained in Chapter 4. As a result, when you change the value of the dependency property in the source object, the bound property in the target object is updated immediately. This is exactly what you want, and it happens without requiring you to build any additional infrastructure.

NOTE

Although it's nice to know that element-to-element binding is the simplest approach, most developers are more interested in finding out which approach is most common in the real world. Overall, the bulk of your ...

Get Pro WPF in C# 2010: Windows Presentation Foundation in .NET 4 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.