[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets the data source for the binding.
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
To create a data source that is inherited by all the child elements in the tree, instead set the DataContext property on the parent element. Then the parent element and all its children look to the DataContext as the source of their bindings. If the is set for a child element, it will override the DataContext inheritance in that instance.
The target can bind directly to the object if the path is empty or to a property of the object as defined by the path. The path is set either in XAML with the binding syntax or when the Binding object is created.
XAML Usage Notes
Property element syntax to create an object element that fills a Binding.Source property element is possible, but uncommon.
, RelativeSource, and ElementName are mutually exclusive in a binding. If you have set one of these attributes, then setting either of the other two in a binding (through XAML or through code) will cause an exception.