aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch/Controls
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2022-03-07 15:18:09 +0200
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2022-03-07 15:18:09 +0200
commit9a10cf4ba24ab43140b0310213b575c0d2131b0c (patch)
tree2836055e4c41d7f38393d51402b0bcfd65a8cd46 /Software/Visual_Studio/Tango.Touch/Controls
parent6c56b49d815afa016a4ce74eed3e4b983c8a161c (diff)
downloadTango-9a10cf4ba24ab43140b0310213b575c0d2131b0c.tar.gz
Tango-9a10cf4ba24ab43140b0310213b575c0d2131b0c.zip
Color Selection Dialog . Save color space on select tab., White color saving.
Related Work Items: #6277
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls')
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.cs22
1 files changed, 19 insertions, 3 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.cs
index a2a7a1c05..adb98d91d 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.cs
@@ -20,7 +20,8 @@ namespace Tango.Touch.Controls
{
public const string Number_PART = "Number_PART";
private TouchNumericTextBox _numericValue;
-
+ private bool _changedFromAnotherControl;
+
#region Properties
public double Value
@@ -58,7 +59,7 @@ namespace Tango.Touch.Controls
/// </summary>
public static readonly DependencyProperty MaxValueProperty =
DependencyProperty.Register("MaxValue", typeof(double), typeof(TouchNumericUpDownConrol), new PropertyMetadata(100.0));
-
+
#endregion
#region Commands
@@ -95,6 +96,7 @@ namespace Tango.Touch.Controls
DecrementCommand = new RelayCommand(() => {
Value -= 1;
}, (x) => { return (Value - 1) >= MinValue; });
+ _changedFromAnotherControl = false;
}
@@ -126,7 +128,18 @@ namespace Tango.Touch.Controls
{
Value = _numericValue.Value;
}
-
+
+ public void SetValueAnotherControl(double newValue)
+ {
+ if(Value != newValue)
+ {
+ _changedFromAnotherControl = true;
+ Value = newValue;
+ _changedFromAnotherControl = false;
+ }
+
+ }
+
private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
TouchNumericUpDownConrol colorPickerNumericUpDown = (TouchNumericUpDownConrol)d;
@@ -137,6 +150,9 @@ namespace Tango.Touch.Controls
private void OnValueNumberChanged(double? oldValue, double? newValue)
{
+ if (_changedFromAnotherControl)
+ return;
+
RoutedPropertyChangedEventArgs<double?> args = new RoutedPropertyChangedEventArgs<double?>(oldValue, newValue);
args.RoutedEvent = TouchNumericUpDownConrol.ColorNumberChangedEvent;
RaiseEvent(args);