Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Binding issue after the datacontext changes

$
0
0

Hi,

I have a strange problem... a have a WPF screen on which I have an extended textbox that makes some conversions in some cases and that property is binded to a property on view model. When the data context is changed then the conversions are reevaluated. When reevaluated my extended textbox has the new data context but the BindingOperations.GetBindingExpression(textBox, dpproperty).DataItem is still having the old data context.
Maybe the conversion that I make is too early after changind the data context? Usually the data context is not changed into the whole screen so the bindings to be reevaluated?
Thanks!

Supplementary info:

The bindings are refreshed into the whole tree when data context is changed, but in my case i have some bindings on the template of my extended textbox. Here the datacontext is changed with some delay after the control where is used triggers the data context event, so the bindings are refreshed before the datacontext from my exteded textbox template is really changed, so the binding is still pointing to the old datacontext


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>