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 | |
| 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')
| -rw-r--r-- | Software/Visual_Studio/Tango.Touch/Controls/TouchAutoComplete.xaml | 2 | ||||
| -rw-r--r-- | Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs | 17 |
2 files changed, 16 insertions, 3 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchAutoComplete.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchAutoComplete.xaml index da8580488..b0b78c177 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchAutoComplete.xaml +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchAutoComplete.xaml @@ -138,7 +138,7 @@ </Style.Triggers> </Style> </Canvas.Style> - <TextBlock FontWeight="Bold" FontSize="11" Foreground="{StaticResource TangoPrimaryAccentBrush}" Canvas.Top="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight,Converter={StaticResource MathOperatorConverter},ConverterParameter='*-1'}" Text="{Binding RelativeSource={RelativeSource AncestorType=local:TouchAutoComplete},Path=Watermark}"> + <TextBlock FontWeight="Bold" FontSize="11" Foreground="{StaticResource TangoPrimaryAccentBrush}" Canvas.Top="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight,Converter={StaticResource MathOperatorConverter},ConverterParameter='*-1'}" Text=""> <TextBlock.Style> <Style TargetType="TextBlock"> <Setter Property="Opacity" Value="0"></Setter> 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); + } } } |
