Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Closed Issue: Numberic UpDown Data Binding not working when you press up or down key numerous times [18907]

$
0
0
I belive this si a bug in controls inheriting UpDownBase class.1. Databind value properto of any control inheriting UpDownBase , for example IntegerUpDown, DecimalUpDown, etc...2. Press Up or Down button few times.Result: Binded property does not get changed until you remove focus from the control or press the other up or down button.For example. If I press up key 5 times, the property will not change. If I remove focus from the control or press down key after the 5th time, then it will change.Resolution:I fixed this issue by replacing the line: public static readonly DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(T), typeof(UpDownBase), new FrameworkPropertyMetadata(default(T), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnValueChanged, null, false, UpdateSourceTrigger.LostFocus));withpublic static readonly DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(T), typeof(UpDownBase), new FrameworkPropertyMetadata(default(T), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnValueChanged, null, false, UpdateSourceTrigger.PropertyChanged));i.e. UpdateSourceTrigger.LostFocus with UpdateSourceTrigger.PropertyChangedIf this fix makes sense, please include it in the next release.

Viewing all articles
Browse latest Browse all 4964

Trending Articles



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