aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch/Controls/TouchProgressBar.xaml
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls/TouchProgressBar.xaml')
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchProgressBar.xaml64
1 files changed, 60 insertions, 4 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchProgressBar.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchProgressBar.xaml
index 769efd930..589194276 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchProgressBar.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchProgressBar.xaml
@@ -6,10 +6,66 @@
<ResourceDictionary Source="../Resources/Colors.xaml" />
</ResourceDictionary.MergedDictionaries>
- <Style TargetType="{x:Type local:TouchProgressBar}" BasedOn="{StaticResource {x:Type ProgressBar}}">
- <Setter Property="Background" Value="{StaticResource TangoGrayBrush}"></Setter>
- <Setter Property="BorderThickness" Value="0"></Setter>
- <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter>
+ <Style TargetType="{x:Type local:TouchProgressBar}">
+ <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"/>
+ <Setter Property="Background" Value="{StaticResource TangoGrayBrush}"/>
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type ProgressBar}">
+ <Grid x:Name="TemplateRoot">
+ <VisualStateManager.VisualStateGroups>
+ <VisualStateGroup x:Name="CommonStates">
+ <VisualState x:Name="Determinate"/>
+ <VisualState x:Name="Indeterminate">
+ <Storyboard RepeatBehavior="Forever">
+ <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="Animation">
+ <EasingDoubleKeyFrame KeyTime="0" Value="0.25"/>
+ <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.25"/>
+ <EasingDoubleKeyFrame KeyTime="0:0:2" Value="0.25"/>
+ </DoubleAnimationUsingKeyFrames>
+ <PointAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)" Storyboard.TargetName="Animation">
+ <EasingPointKeyFrame KeyTime="0" Value="-0.5,0.5"/>
+ <EasingPointKeyFrame KeyTime="0:0:1" Value="0.5,0.5"/>
+ <EasingPointKeyFrame KeyTime="0:0:2" Value="1.5,0.5"/>
+ </PointAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ </VisualStateGroup>
+ </VisualStateManager.VisualStateGroups>
+ <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
+ <Rectangle x:Name="PART_Track"/>
+ <Grid x:Name="PART_Indicator" ClipToBounds="true" HorizontalAlignment="Left">
+ <Rectangle x:Name="Indicator" Fill="{TemplateBinding Foreground}"/>
+ <Rectangle x:Name="Animation" Fill="{TemplateBinding Foreground}" RenderTransformOrigin="0.5,0.5">
+ <Rectangle.RenderTransform>
+ <TransformGroup>
+ <ScaleTransform/>
+ <SkewTransform/>
+ <RotateTransform/>
+ <TranslateTransform/>
+ </TransformGroup>
+ </Rectangle.RenderTransform>
+ </Rectangle>
+ </Grid>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <Trigger Property="Orientation" Value="Vertical">
+ <Setter Property="LayoutTransform" TargetName="TemplateRoot">
+ <Setter.Value>
+ <RotateTransform Angle="-90"/>
+ </Setter.Value>
+ </Setter>
+ </Trigger>
+ <Trigger Property="IsIndeterminate" Value="true">
+ <Setter Property="Visibility" TargetName="Indicator" Value="Collapsed"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
</Style>
+
+
</ResourceDictionary> \ No newline at end of file