开发者

When clearing a root datacontext by removing from visual tree, binding further down the tree remains

[Silverlight] I have a large visual object tree I'm removing from the visual tree (Grid.Children.Clear()), upon removal the DataContext of the root nulls out, but further down the tree a binding开发者_JS百科 which looks like this

<Grid DataContext="{Binding FooBar}">

is staying bound to the object it was previously bound to. One would think that the binding would clear once it's DataContext has been nulled out. Is it wrong to clear the children of a grid like this? What else could be causing it?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜