aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2018-07-08 09:07:39 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2018-07-08 09:07:39 +0300
commitf4688d6113dc33deac114bd6999967fec246b8c0 (patch)
tree4e3f7ab1ac0647d26eed6be0c305921aaee7ccdf /Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
parent4ca8cee91fb46977b75e8329c18d9b6a4654b12e (diff)
downloadTango-f4688d6113dc33deac114bd6999967fec246b8c0.tar.gz
Tango-f4688d6113dc33deac114bd6999967fec246b8c0.zip
Working on PPC segments loading performance.
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs')
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs13
1 files changed, 10 insertions, 3 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
index 09b5e8f96..50c478acc 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
@@ -21,6 +21,7 @@ namespace Tango.Touch.Controls
private TextBox _text_box;
private bool _prevent_text_change;
private TextBlock _text_block;
+ private double _lastValue;
Regex regex_integer = new Regex(@"^[0-9]*(?:[0-9]*)?$");
Regex regex_double = new Regex(@"^[0-9]*(?:\.[0-9]*)?$");
@@ -179,10 +180,16 @@ namespace Tango.Touch.Controls
}
}
- BindingExpression b = GetBindingExpression(ValueProperty);
- if (b != null)
+ if (Value != _lastValue)
{
- b.UpdateSource();
+ BindingExpression b = GetBindingExpression(ValueProperty);
+
+ if (b != null)
+ {
+ b.UpdateSource();
+ }
+
+ _lastValue = Value;
}
}