diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-12-23 00:24:11 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-12-23 00:24:11 +0200 |
| commit | 518c9192e4445d82f192edcccb2ffb64ffc88a65 (patch) | |
| tree | bbf30297b0e452066801aefd9c9f2916020e57a6 /Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs | |
| parent | 7b6ec0a4e66a4402d5ee0beb4b34b18604e28cd8 (diff) | |
| download | Tango-518c9192e4445d82f192edcccb2ffb64ffc88a65.tar.gz Tango-518c9192e4445d82f192edcccb2ffb64ffc88a65.zip | |
ColorSpace per stop implemented on PPC.
Synchronization only when values change.
Volume open for all.
RGB to closest catalog item...
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs index 2a0caf13e..da5d5e34b 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs @@ -109,6 +109,16 @@ namespace Tango.Touch.Controls public static readonly DependencyProperty AutoCalculateJogStepProperty = DependencyProperty.Register("AutoCalculateJogStep", typeof(bool), typeof(TouchNumericTextBox), new PropertyMetadata(true)); + public bool UpdateBindingOnlyWhenFocused + { + get { return (bool)GetValue(UpdateBindingOnlyWhenFocusedProperty); } + set { SetValue(UpdateBindingOnlyWhenFocusedProperty, value); } + } + public static readonly DependencyProperty UpdateBindingOnlyWhenFocusedProperty = + DependencyProperty.Register("UpdateBindingOnlyWhenFocused", typeof(bool), typeof(TouchNumericTextBox), new PropertyMetadata(false)); + + + public override void OnApplyTemplate() { base.OnApplyTemplate(); @@ -222,8 +232,11 @@ namespace Tango.Touch.Controls _lastValue = Value; - DoubleValueChangedEventArgs args = new DoubleValueChangedEventArgs(ValueChangedEvent, this, Value); - RaiseEvent(args); + if (!UpdateBindingOnlyWhenFocused || (_text_box != null && _text_box.IsKeyboardFocused)) + { + DoubleValueChangedEventArgs args = new DoubleValueChangedEventArgs(ValueChangedEvent, this, Value); + RaiseEvent(args); + } } } |
