From 20f49c625cd32b95154db138ed7eeebbadd04bf7 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Mon, 1 Nov 2021 14:53:16 +0200 Subject: Color selection and Job sequence package. Redesign list control, move Color Selection View to dialogs, implement save. --- .../Tango.Touch/Controls/TouchNumericTextBox.cs | 24 +++++++++++++++------- .../Tango.Touch/Controls/TouchNumericTextBox.xaml | 10 ++++----- .../Tango.Touch/Controls/TouchTextBox.xaml | 5 +++-- 3 files changed, 25 insertions(+), 14 deletions(-) (limited to 'Software/Visual_Studio/Tango.Touch/Controls') 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; + } } } diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.xaml index d347480d6..f26e53e73 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.xaml +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.xaml @@ -8,8 +8,8 @@ xmlns:local="clr-namespace:Tango.Touch.Controls"> - - + + @@ -40,8 +40,8 @@ BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" keyboard:KeyboardView.Container="{TemplateBinding KeyboardContainer}"> - - + + @@ -72,7 +72,7 @@ - + diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.xaml index dcb52859e..c95c87782 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.xaml +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.xaml @@ -8,7 +8,8 @@ xmlns:local="clr-namespace:Tango.Touch.Controls"> - + + @@ -39,7 +40,7 @@ - + -- cgit v1.3.1