March 2010
Intermediate to advanced
1216 pages
33h 44m
English
So far, you've focused on adding bindings that link two elements. But in data-driven applications, it's more common to create binding expressions that draw their data from a nonvisual object. The only requirement is that the information you want to display must be stored in public properties. The WPF data binding infrastructure won't pick up private information or public fields.
When binding to an object that isn't an element, you need to give up the Binding.ElementName property and use one of the following properties instead:
Source. This is a reference that points to the source object—in other words, the object that's supplying the data.
RelativeSource. This points to the source object using a RelativeSource ...
Read now
Unlock full access