Is there anyway to stop automatic DataContext inheritance in Silverlight?
I Set my DataContext on my parent UserControl in code. As a result all the xaml bindings inside the UserControl try to bind to the new DataConext they get (through the automatic DataContext Inheritance).
The DataContext's for the children elements (actually they are children of children of children) of the UserControl is something I need to set in the UserControl's code... I don't want them being all smart because they end up binding to the wrong data object! :-)
Can you set the DataContext to {x:Null} in XAML, or null in code, for the items you don't want the inherited context for?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With