c# - WPF Binding TwoWay not working, OneWayToSource working. WHY? -


i have control dependencyproperty of type timespan. when try bind property, value not being updated.

usage of control:

<controls:timecontrol time={binding sometimespanproperty} /> 

when change value of time in control, change not updated in sometimespanproperty. however, if change {binding sometimespanproperty} {binding sometimespanproperty,mode=onewaytosource}, updated.

i found solution. if reading in future wants know it:

i had explicitly set mode of binding twoway, because default binding mode timespan type property oneway.

from this:

<controls:timecontrol time={binding sometimespanproperty} /> 

to this:

<controls:timecontrol time={binding sometimespanproperty,mode=twoway} /> 

and works!


Comments

Popular posts from this blog

java - unable show chart in xls document using jasper reports -

javascript - How to change image src on success AJAX -

java.lang.RuntimeException: Could not generate dummy secret at sun.security.ssl.RSAClientKeyExchange.<init> -