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

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -