From f4688d6113dc33deac114bd6999967fec246b8c0 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Sun, 8 Jul 2018 09:07:39 +0300 Subject: Working on PPC segments loading performance. --- .../Tango.Touch/Controls/TouchNumericTextBox.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs') 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; } } -- cgit v1.3.1