aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch/Styles/TouchNumericUpDownControl.xaml
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2022-11-22 21:50:21 +0200
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2022-11-22 21:50:21 +0200
commitfd5aa92662a4244637ef362d5feaff2293cbf2bb (patch)
tree591cb73393f2b47180e9665406c50ea117dec355 /Software/Visual_Studio/Tango.Touch/Styles/TouchNumericUpDownControl.xaml
parent4b7ca7de06c5a9ec6fb3e11e5a4b01f2d20144f6 (diff)
downloadTango-fd5aa92662a4244637ef362d5feaff2293cbf2bb.tar.gz
Tango-fd5aa92662a4244637ef362d5feaff2293cbf2bb.zip
Vector Fine Tuning. Gui changes.
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Styles/TouchNumericUpDownControl.xaml')
-rw-r--r--Software/Visual_Studio/Tango.Touch/Styles/TouchNumericUpDownControl.xaml88
1 files changed, 88 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Styles/TouchNumericUpDownControl.xaml b/Software/Visual_Studio/Tango.Touch/Styles/TouchNumericUpDownControl.xaml
index d29cd2a48..3978e6c4c 100644
--- a/Software/Visual_Studio/Tango.Touch/Styles/TouchNumericUpDownControl.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Styles/TouchNumericUpDownControl.xaml
@@ -94,5 +94,93 @@
</Setter.Value>
</Setter>
</Style>
+ <Style x:Key="TouchNumericBorderUpDownControl" TargetType="{x:Type controls:TouchNumericUpDownConrol}">
+ <Setter Property="Background" Value="{StaticResource TangoNotificationBarMaskBrush}"/>
+ <Setter Property="Height" Value="40"/>
+ <Setter Property="Width" Value="160"/>
+ <Setter Property="BorderBrush" Value="{StaticResource TangoDividerBrush}"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="controls:TouchNumericUpDownConrol">
+ <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0.6" Height="{TemplateBinding Height}">
+ <Grid Width="{TemplateBinding Width}">
+ <Grid.Resources>
+ <Style x:Key="emptyButton" TargetType="RepeatButton" >
+ <Setter Property="Background" Value="Transparent" />
+ <Setter Property="Focusable" Value="False"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoMidAccentBrush}" />
+ <Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="RepeatButton">
+ <Border Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
+ <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
+ </Border>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <Trigger Property="RepeatButton.IsPressed" Value="True">
+ <Setter Property="Background" Value="Transparent" />
+ <Setter Property="Foreground" Value="{StaticResource TangoKeyboardKeyLightBrush}" />
+ </Trigger>
+ <EventTrigger RoutedEvent="RepeatButton.TouchDown">
+ <EventTrigger.Actions>
+ <BeginStoryboard>
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TransparentBrush}"></DiscreteObjectKeyFrame>
+ </ObjectAnimationUsingKeyFrames>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TangoKeyboardKeyLightTextBrush}"></DiscreteObjectKeyFrame>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </BeginStoryboard>
+ </EventTrigger.Actions>
+ </EventTrigger>
+ <EventTrigger RoutedEvent="RepeatButton.TouchLeave">
+ <EventTrigger.Actions>
+ <BeginStoryboard>
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TransparentBrush}"></DiscreteObjectKeyFrame>
+ </ObjectAnimationUsingKeyFrames>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TangoKeyboardKeyDarkTextBrush}"></DiscreteObjectKeyFrame>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </BeginStoryboard>
+ </EventTrigger.Actions>
+ </EventTrigger>
+ </Style.Triggers>
+ </Style>
+ </Grid.Resources>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="1*"/>
+ <ColumnDefinition Width="1*"/>
+ <ColumnDefinition Width="1*"/>
+ </Grid.ColumnDefinitions>
+
+ <RepeatButton Margin="2 0 2 0" Background="Transparent" BorderBrush="Transparent" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" Height="{TemplateBinding Height}" VerticalContentAlignment="Stretch" Padding="2" Style="{StaticResource emptyButton}" Command="{Binding Path=DecrementCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=controls:TouchNumericUpDownConrol}, Mode=TwoWay}" VerticalAlignment="Stretch" KeyboardNavigation.TabNavigation ="None">
+ <controls:TouchIcon Icon="Minus" Width="22" Height="Auto" VerticalAlignment="Center"/>
+ </RepeatButton>
+
+ <Rectangle DockPanel.Dock="Right" Width="0.6" Fill="{Binding RelativeSource={RelativeSource AncestorType=controls:TouchNumericUpDownConrol}, Path= BorderBrush}" Height="32" HorizontalAlignment="Right"></Rectangle>
+
+ <controls:TouchNumericTextBox x:Name="Number_PART" Grid.Column="1" Margin="1 4 1 0" FontSize="{StaticResource TangoMessageBoxMessageFontSize}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalAlignment="Center" BorderBrush="Transparent" VerticalContentAlignment="Center" UpdateBindingOnlyWhenFocused="True"
+ Value="{Binding Value,RelativeSource={RelativeSource AncestorType=controls:TouchNumericUpDownConrol}, Mode=TwoWay}" Minimum="{Binding MinValue,RelativeSource={RelativeSource AncestorType=controls:TouchNumericUpDownConrol}}" Maximum="{Binding MaxValue,RelativeSource={RelativeSource AncestorType=controls:TouchNumericUpDownConrol}, Mode=TwoWay}" HideUnderline="True" HasDecimalPoint="True" KeyboardNavigation.TabNavigation="Continue"/>
+
+ <Rectangle Grid.Column="1" Width="0.6" Fill="{Binding RelativeSource={RelativeSource AncestorType=controls:TouchNumericUpDownConrol}, Path= BorderBrush}" Height="40" HorizontalAlignment="Right"></Rectangle>
+
+ <RepeatButton Grid.Column="2" Background="Transparent" BorderBrush="Transparent" Margin="0 0 0 0" Padding="2" Style="{StaticResource emptyButton}" Command="{Binding Path=IncrementCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=controls:TouchNumericUpDownConrol}, Mode=TwoWay}" VerticalAlignment="Center" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" KeyboardNavigation.TabNavigation ="None">
+ <controls:TouchIcon Icon="Plus" Width="22" VerticalAlignment="Center"/>
+ </RepeatButton>
+
+ </Grid>
+ </Border>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
</ResourceDictionary> \ No newline at end of file