Silverlight: Determine whether DataContext is inherited or not

Posted by Geoff Hudik on Stack Overflow See other posts from Stack Overflow or by Geoff Hudik
Published on 2009-05-14T18:58:27Z Indexed on 2010/04/16 15:03 UTC
Read the original article Hit count: 406

Filed under:
|
|

At runtime in a generic fashion (i.e. iterating UIElements) can I determine if a given FrameWorkElement has a non-inherited DataContext property set? I want a list of elements where DataContext was explicitly set, not inherited from higher up in the chain. I thought perhaps GetBindingExpression() would help but so far it has not. Using Silverlight beta 3.

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about datacontext