Here\'s what I essentially want.
A UserControl
with a TextBlock
whose Text
property is binded to the Prop
property of the
The reason it doesn't work is that binding paths are relative to the DataContext, not to the (parent) control.
This is why you can fix this by setting the RelativeSource; in that case the binding path uses the RelativeSource as the starting point of finding the property.
Another way to solve it is by naming the parent and setting the ElementName of the binding.
The MVVM way of doing this is adding a property to a ViewModel class, set the parent control's DataContext to an instance of the ViewModel and binding both the parent control and the client control to that property.