aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2021-11-01 14:53:16 +0200
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2021-11-01 14:53:16 +0200
commit20f49c625cd32b95154db138ed7eeebbadd04bf7 (patch)
tree951627b53972a48e77f9c3d11e9de5295e15fa45 /Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
parentb1049c0822b76939215225a617e143274abe2e8b (diff)
downloadTango-20f49c625cd32b95154db138ed7eeebbadd04bf7.tar.gz
Tango-20f49c625cd32b95154db138ed7eeebbadd04bf7.zip
Color selection and Job sequence package. Redesign list control, move Color Selection View to dialogs, implement save.
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs')
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs24
1 files changed, 17 insertions, 7 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
index 18fb0726f..ad185f1a3 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
@@ -117,7 +117,14 @@ namespace Tango.Touch.Controls
public static readonly DependencyProperty UpdateBindingOnlyWhenFocusedProperty =
DependencyProperty.Register("UpdateBindingOnlyWhenFocused", typeof(bool), typeof(TouchNumericTextBox), new PropertyMetadata(false));
-
+ public virtual bool HasError
+ {
+ get
+ {
+ return Validation.GetHasError(this);
+ }
+ }
+
public override void OnApplyTemplate()
{
@@ -161,13 +168,16 @@ namespace Tango.Touch.Controls
value = Math.Round(value, 0);
}
- if (value < Minimum)
- {
- value = Minimum;
- }
- else if (value > Maximum)
+ if (Maximum > Minimum)
{
- value = Maximum;
+ if (value < Minimum)
+ {
+ value = Minimum;
+ }
+ else if (value > Maximum)
+ {
+ value = Maximum;
+ }
}
}