diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2022-05-14 21:34:53 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2022-05-14 21:34:53 +0300 |
| commit | baa65cb88df619c3df68bdf91e0e0476ca614998 (patch) | |
| tree | 285bdba7a53fc3e4f4e282dac96f03bf58ff0b86 /Software/Visual_Studio/Tango.Touch/Controls | |
| parent | f42516c06b3bb1f4f2f05384a4c341ee423aed82 (diff) | |
| download | Tango-baa65cb88df619c3df68bdf91e0e0476ca614998.tar.gz Tango-baa65cb88df619c3df68bdf91e0e0476ca614998.zip | |
Vector Fine Tuning - add dialog.
Related Work Items: #6536
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls')
| -rw-r--r-- | Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.cs | 16 | ||||
| -rw-r--r-- | Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.xaml | 4 |
2 files changed, 17 insertions, 3 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.cs index adb98d91d..2b85e8168 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.cs +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.cs @@ -59,7 +59,21 @@ namespace Tango.Touch.Controls /// </summary> public static readonly DependencyProperty MaxValueProperty = DependencyProperty.Register("MaxValue", typeof(double), typeof(TouchNumericUpDownConrol), new PropertyMetadata(100.0)); - + + + + public double NumericPartWidth + { + get { return (double)GetValue(NumericPartWidthProperty); } + set { SetValue(NumericPartWidthProperty, value); } + } + + // Using a DependencyProperty as the backing store for NumericPartWidth. This enables animation, styling, binding, etc... + public static readonly DependencyProperty NumericPartWidthProperty = + DependencyProperty.Register("NumericPartWidth", typeof(double), typeof(TouchNumericUpDownConrol), new PropertyMetadata(54.0)); + + + #endregion #region Commands diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.xaml index 31c32be83..9cfb89767 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.xaml +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericUpDownConrol.xaml @@ -79,7 +79,7 @@ </Style.Triggers> </Style> </StackPanel.Resources> - <Border Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" CornerRadius="2" Width="54"> + <Border Background="Transparent" BorderBrush="{StaticResource TangoGrayBrush}" BorderThickness="0.8" CornerRadius="2" Width="{Binding NumericPartWidth,RelativeSource={RelativeSource AncestorType=local:TouchNumericUpDownConrol}}" > <local:TouchNumericTextBox x:Name="Number_PART" Margin="0 4 0 0" FontSize="20" HorizontalContentAlignment="Center" VerticalAlignment="Center" BorderBrush="{TemplateBinding BorderBrush}" VerticalContentAlignment="Center" UpdateBindingOnlyWhenFocused="True" Value="{Binding Value,RelativeSource={RelativeSource AncestorType=local:TouchNumericUpDownConrol}}" Minimum="{Binding MinValue,RelativeSource={RelativeSource AncestorType=local:TouchNumericUpDownConrol}}" Maximum="{Binding MaxValue,RelativeSource={RelativeSource AncestorType=local:TouchNumericUpDownConrol}}" HasDecimalPoint="True" StringFormat="0.#"/> @@ -91,7 +91,7 @@ Command="{Binding Path=DecrementCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:TouchNumericUpDownConrol}, Mode=TwoWay}"> <local:TouchIcon Focusable="False" Icon="Minus" Width="16" Height="3"/> </RepeatButton> - <Rectangle Margin="1 0 0 0" Width="0.8" Fill="{StaticResource TangoGrayBrush}"></Rectangle> + <Rectangle Margin="1 0 1 0" Width="0.8" Fill="{StaticResource TangoGrayBrush}"></Rectangle> <RepeatButton Focusable="False" Background="Transparent" Margin="8 0 0 0" Padding="4" Style="{StaticResource emptyButton}" Command="{Binding Path=IncrementCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:TouchNumericUpDownConrol}, Mode=TwoWay}"> <local:TouchIcon Focusable="False" Icon="Plus" Width="16"/> |
