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

Closed Issue: IntegerUpDown: Text property and actual text gets unsynchronized [18801]

$
0
0
Problem:The text that is displayed in my IntegerUpDown's textbox does not match the Text property of the IntegerUpDown (the Text property of IntegerUpDown.Textbox matches IntegerUpDown.Text) when using the Maximum property.Repro:1. Create an IntegerUpDown on the page with Maximum set to 1023.2. Run the page, and type in 1024. It changes the value to 1023 automatically.3. Type 4. The text displayed is 10234, but the Text and Value property is 1023.My solution:Modify UpDownBase's SyncTextAndValueProperties method:protected void SyncTextAndValueProperties(DependencyProperty p, string text){ ... Text = ConvertValueToText(); //my code here if(TextBox != null && TextBox.Text.Equals(Text)) { TextBox.InvalidateProperty(TextBox.TextProperty); } //end of my code#if VS2008 ...}

Viewing all articles
Browse latest Browse all 4964

Trending Articles



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