Assigning the Source of a Binding

When we first discussed data binding in Chapter 2, you learned that a binding has both a source and a target, with the binding source obtained from the bound control's DataContext property. The object assigned to the DataContext property is inherited down through the object hierarchy, so an object assigned to the DataContext property of a Grid control, for example, would automatically be available to all the controls contained within that Grid via their own DataContext properties.

However, what if you wanted a property on a control to bind to something other than the control's DataContext property, such as a resource, or a property on another control? Let's take a look at the different means available to achieve ...

Get Pro Business Applications with Silverlight 5 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.