Is there anyway to stop automatic DataContext inheritance in Silverlight?

Posted by Ant on Stack Overflow See other posts from Stack Overflow or by Ant
Published on 2010-04-03T05:02:27Z Indexed on 2010/04/03 18:53 UTC
Read the original article Hit count: 243

Filed under:
|

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! :-)

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about datacontext