fixed #314
This commit is contained in:
1 parent
6f3a333763
commit
5ac4c644d5
3 files changed
+118
-25
No files matched your search
+17
-3
@@ -11,7 +11,7 @@
|
|||||||
<ProgressBar Style="{StaticResource ProgressBarSuccess}" Margin="0,0,0,10" Value="40"/>
|
<ProgressBar Style="{StaticResource ProgressBarSuccess}" Margin="0,0,0,10" Value="40"/>
|
||||||
<ProgressBar Style="{StaticResource ProgressBarInfo}" Margin="0,0,0,10" Value="60"/>
|
<ProgressBar Style="{StaticResource ProgressBarInfo}" Margin="0,0,0,10" Value="60"/>
|
||||||
<ProgressBar Style="{StaticResource ProgressBarWarning}" Margin="0,0,0,10" Value="80"/>
|
<ProgressBar Style="{StaticResource ProgressBarWarning}" Margin="0,0,0,10" Value="80"/>
|
||||||
<ProgressBar Style="{StaticResource ProgressBarDanger}" Margin="0,0,0,10" Value="100" Maximum="200"/>
|
<ProgressBar Style="{StaticResource ProgressBarDanger}" Margin="0,0,0,10" Value="100" Maximum="200" IsIndeterminate="True"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Margin="10,0,0,0" Width="200" HorizontalAlignment="Left">
|
<StackPanel Margin="10,0,0,0" Width="200" HorizontalAlignment="Left">
|
||||||
<TextBlock Padding="0,2,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressbarPrimary" HorizontalAlignment="Left"/>
|
<TextBlock Padding="0,2,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressbarPrimary" HorizontalAlignment="Left"/>
|
||||||
@@ -27,8 +27,8 @@
|
|||||||
<ProgressBar Style="{StaticResource ProgressBarSuccessStripe}" Margin="0,0,0,10" Value="60" Maximum="200" />
|
<ProgressBar Style="{StaticResource ProgressBarSuccessStripe}" Margin="0,0,0,10" Value="60" Maximum="200" />
|
||||||
<ProgressBar Style="{StaticResource ProgressBarInfoStripe}" Margin="0,0,0,10" Value="50" Maximum="200" />
|
<ProgressBar Style="{StaticResource ProgressBarInfoStripe}" Margin="0,0,0,10" Value="50" Maximum="200" />
|
||||||
<ProgressBar Style="{StaticResource ProgressBarWarningStripe}" Margin="0,0,0,10" Value="180" Maximum="200" />
|
<ProgressBar Style="{StaticResource ProgressBarWarningStripe}" Margin="0,0,0,10" Value="180" Maximum="200" />
|
||||||
<ProgressBar Style="{StaticResource ProgressBarDangerStripe}" Margin="0,0,0,10" Value="110" Maximum="200" />
|
<ProgressBar Style="{StaticResource ProgressBarDangerStripe}" Margin="0,0,0,10" IsIndeterminate="True" Maximum="200" />
|
||||||
<ProgressBar Style="{StaticResource ProgressBarFlat}" Margin="0,8,0,10" Value="110" Maximum="200" />
|
<ProgressBar Style="{StaticResource ProgressBarFlat}" Margin="0,8,0,10" Value="110" Maximum="200" IsIndeterminate="True"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Margin="10,0,0,0" Width="200" HorizontalAlignment="Left">
|
<StackPanel Margin="10,0,0,0" Width="200" HorizontalAlignment="Left">
|
||||||
<TextBlock Padding="0,2,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarPrimaryStripe" HorizontalAlignment="Left"/>
|
<TextBlock Padding="0,2,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarPrimaryStripe" HorizontalAlignment="Left"/>
|
||||||
@@ -39,6 +39,20 @@
|
|||||||
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarPlayer" HorizontalAlignment="Left"/>
|
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarPlayer" HorizontalAlignment="Left"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal" Height="200">
|
||||||
|
<ProgressBar Value="20" Margin="0,0,10,0" Orientation="Vertical" Width="20"/>
|
||||||
|
<ProgressBar Style="{StaticResource ProgressBarSuccess}" Margin="0,0,10,0" Value="40" Orientation="Vertical" Width="20"/>
|
||||||
|
<ProgressBar Style="{StaticResource ProgressBarInfo}" Margin="0,0,10,0" Value="60" Orientation="Vertical" Width="20"/>
|
||||||
|
<ProgressBar Style="{StaticResource ProgressBarWarning}" Margin="0,0,10,0" Value="80" Orientation="Vertical" Width="20"/>
|
||||||
|
<ProgressBar Style="{StaticResource ProgressBarDanger}" Margin="0,0,10,0" Value="100" Maximum="200" IsIndeterminate="True" Width="20" Orientation="Vertical"/>
|
||||||
|
|
||||||
|
<ProgressBar Style="{StaticResource ProgressBarPrimaryStripe}" Margin="10,0,10,0" Value="120" Maximum="200" Orientation="Vertical" Width="20" />
|
||||||
|
<ProgressBar Style="{StaticResource ProgressBarSuccessStripe}" Margin="0,0,10,0" Value="60" Maximum="200" Orientation="Vertical" Width="20" />
|
||||||
|
<ProgressBar Style="{StaticResource ProgressBarInfoStripe}" Margin="0,0,10,0" Value="50" Maximum="200" Orientation="Vertical" Width="20" />
|
||||||
|
<ProgressBar Style="{StaticResource ProgressBarWarningStripe}" Margin="0,0,10,0" Value="180" Maximum="200" Orientation="Vertical" Width="20" />
|
||||||
|
<ProgressBar Style="{StaticResource ProgressBarDangerStripe}" Margin="0,0,10,0" IsIndeterminate="True" Maximum="200" Orientation="Vertical" Width="20"/>
|
||||||
|
<ProgressBar Style="{StaticResource ProgressBarFlat}" Margin="0,0,10,0" Value="110" Maximum="200" IsIndeterminate="True" Orientation="Vertical" Width="4"/>
|
||||||
|
</StackPanel>
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
</hc:TransitioningContentControl>
|
</hc:TransitioningContentControl>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:controls="clr-namespace:HandyControl.Controls"
|
xmlns:controls="clr-namespace:HandyControl.Controls"
|
||||||
xmlns:shapes="clr-namespace:HandyControl.Expression.Shapes">
|
xmlns:shapes="clr-namespace:HandyControl.Expression.Shapes"
|
||||||
|
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||||
|
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceDictionary Source="../../Basic/Sizes.xaml"/>
|
<ResourceDictionary Source="../../Basic/Sizes.xaml"/>
|
||||||
@@ -33,18 +34,58 @@
|
|||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="ProgressBar">
|
<ControlTemplate TargetType="ProgressBar">
|
||||||
<controls:SimplePanel x:Name="TemplateRoot">
|
<ControlTemplate.Resources>
|
||||||
<Border CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
|
<Storyboard x:Key="IsIndeterminate" 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>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<Border x:Name="TemplateRoot" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
|
<controls:SimplePanel>
|
||||||
<Rectangle x:Name="PART_Track"/>
|
<Rectangle x:Name="PART_Track"/>
|
||||||
<controls:SimplePanel HorizontalAlignment="Left">
|
<Border Style="{StaticResource BorderClip}" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="PART_Indicator" HorizontalAlignment="Left">
|
||||||
<Decorator x:Name="PART_Indicator" HorizontalAlignment="Left">
|
<controls:SimplePanel>
|
||||||
<Border CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="Animation" ClipToBounds="true" Background="{TemplateBinding Foreground}">
|
<Border x:Name="Indicator" Background="{TemplateBinding Foreground}">
|
||||||
<Rectangle x:Name="PART_GlowRect" Fill="{StaticResource ProgressBarIndicatorAnimatedFill}" HorizontalAlignment="Left" Margin="-100,0,0,0" Width="100"/>
|
|
||||||
</Border>
|
|
||||||
</Decorator>
|
|
||||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TextIconBrush}" Text="{Binding Path=(controls:VisualElement.Text),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TextIconBrush}" Text="{Binding Path=(controls:VisualElement.Text),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
</Border>
|
||||||
|
<Rectangle x:Name="PART_GlowRect" Fill="{StaticResource ProgressBarIndicatorAnimatedFill}" HorizontalAlignment="Left" Margin="-100,0,0,0" Width="100"/>
|
||||||
|
<Rectangle x:Name="Animation" Visibility="Collapsed" Fill="{TemplateBinding Foreground}" RenderTransformOrigin="0.5,0.5">
|
||||||
|
<Rectangle.RenderTransform>
|
||||||
|
<TransformGroup>
|
||||||
|
<ScaleTransform/>
|
||||||
|
</TransformGroup>
|
||||||
|
</Rectangle.RenderTransform>
|
||||||
|
</Rectangle>
|
||||||
</controls:SimplePanel>
|
</controls:SimplePanel>
|
||||||
|
</Border>
|
||||||
</controls:SimplePanel>
|
</controls:SimplePanel>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="Orientation" Value="Vertical">
|
||||||
|
<Setter Property="Height" Value="{x:Static system:Double.NaN}"/>
|
||||||
|
<Setter Property="LayoutTransform" TargetName="TemplateRoot">
|
||||||
|
<Setter.Value>
|
||||||
|
<RotateTransform Angle="-90"/>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsIndeterminate" Value="true">
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource IsIndeterminate}"/>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Setter Property="Visibility" TargetName="Indicator" Value="Collapsed"/>
|
||||||
|
<Setter Property="Visibility" TargetName="PART_GlowRect" Value="Collapsed"/>
|
||||||
|
<Setter Property="Visibility" TargetName="Animation" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
@@ -70,11 +111,19 @@
|
|||||||
<controls:SimplePanel x:Name="TemplateRoot" SnapsToDevicePixels="true">
|
<controls:SimplePanel x:Name="TemplateRoot" SnapsToDevicePixels="true">
|
||||||
<Border CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
|
<Border CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
|
||||||
<Rectangle x:Name="PART_Track"/>
|
<Rectangle x:Name="PART_Track"/>
|
||||||
<Decorator x:Name="PART_Indicator" HorizontalAlignment="Left" Margin="1">
|
<Decorator x:Name="PART_Indicator" HorizontalAlignment="Left">
|
||||||
<Border x:Name="Indicator" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" Background="{TemplateBinding Foreground}"/>
|
<Border x:Name="Indicator" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" Background="{TemplateBinding Foreground}"/>
|
||||||
</Decorator>
|
</Decorator>
|
||||||
</controls:SimplePanel>
|
</controls:SimplePanel>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="Orientation" Value="Vertical">
|
||||||
|
<Setter Property="Height" Value="{x:Static system:Double.NaN}"/>
|
||||||
|
<Setter Property="LayoutTransform" TargetName="TemplateRoot">
|
||||||
|
<Setter.Value>
|
||||||
|
<RotateTransform Angle="-90"/>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Trigger>
|
||||||
<EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="Indicator">
|
<EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="Indicator">
|
||||||
<BeginStoryboard Storyboard="{StaticResource OnLoaded}"/>
|
<BeginStoryboard Storyboard="{StaticResource OnLoaded}"/>
|
||||||
</EventTrigger>
|
</EventTrigger>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:controls="clr-namespace:HandyControl.Controls">
|
xmlns:controls="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||||
|
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceDictionary Source="Base/ProgressBarBaseStyle.xaml"/>
|
<ResourceDictionary Source="Base/ProgressBarBaseStyle.xaml"/>
|
||||||
@@ -42,8 +43,8 @@
|
|||||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
||||||
<GradientStop Color="{DynamicResource DarkPrimaryColor}" Offset="0"/>
|
<GradientStop Color="{DynamicResource DarkPrimaryColor}" Offset="0"/>
|
||||||
<GradientStop Color="{DynamicResource DarkPrimaryColor}" Offset="0.5"/>
|
<GradientStop Color="{DynamicResource DarkPrimaryColor}" Offset="0.5"/>
|
||||||
<GradientStop Color="White" Offset="0.5"/>
|
<GradientStop Color="{DynamicResource BackgroundColor}" Offset="0.5"/>
|
||||||
<GradientStop Color="White" Offset="1"/>
|
<GradientStop Color="{DynamicResource BackgroundColor}" Offset="1"/>
|
||||||
</LinearGradientBrush>
|
</LinearGradientBrush>
|
||||||
</GeometryDrawing.Brush>
|
</GeometryDrawing.Brush>
|
||||||
<GeometryDrawing.Geometry>
|
<GeometryDrawing.Geometry>
|
||||||
@@ -72,8 +73,8 @@
|
|||||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
||||||
<GradientStop Color="{DynamicResource DarkSuccessColor}" Offset="0"/>
|
<GradientStop Color="{DynamicResource DarkSuccessColor}" Offset="0"/>
|
||||||
<GradientStop Color="{DynamicResource DarkSuccessColor}" Offset="0.5"/>
|
<GradientStop Color="{DynamicResource DarkSuccessColor}" Offset="0.5"/>
|
||||||
<GradientStop Color="White" Offset="0.5"/>
|
<GradientStop Color="{DynamicResource BackgroundColor}" Offset="0.5"/>
|
||||||
<GradientStop Color="White" Offset="1"/>
|
<GradientStop Color="{DynamicResource BackgroundColor}" Offset="1"/>
|
||||||
</LinearGradientBrush>
|
</LinearGradientBrush>
|
||||||
</GeometryDrawing.Brush>
|
</GeometryDrawing.Brush>
|
||||||
<GeometryDrawing.Geometry>
|
<GeometryDrawing.Geometry>
|
||||||
@@ -102,8 +103,8 @@
|
|||||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
||||||
<GradientStop Color="{DynamicResource DarkInfoColor}" Offset="0"/>
|
<GradientStop Color="{DynamicResource DarkInfoColor}" Offset="0"/>
|
||||||
<GradientStop Color="{DynamicResource DarkInfoColor}" Offset="0.5"/>
|
<GradientStop Color="{DynamicResource DarkInfoColor}" Offset="0.5"/>
|
||||||
<GradientStop Color="White" Offset="0.5"/>
|
<GradientStop Color="{DynamicResource BackgroundColor}" Offset="0.5"/>
|
||||||
<GradientStop Color="White" Offset="1"/>
|
<GradientStop Color="{DynamicResource BackgroundColor}" Offset="1"/>
|
||||||
</LinearGradientBrush>
|
</LinearGradientBrush>
|
||||||
</GeometryDrawing.Brush>
|
</GeometryDrawing.Brush>
|
||||||
<GeometryDrawing.Geometry>
|
<GeometryDrawing.Geometry>
|
||||||
@@ -132,8 +133,8 @@
|
|||||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
||||||
<GradientStop Color="{DynamicResource DarkWarningColor}" Offset="0"/>
|
<GradientStop Color="{DynamicResource DarkWarningColor}" Offset="0"/>
|
||||||
<GradientStop Color="{DynamicResource DarkWarningColor}" Offset="0.5"/>
|
<GradientStop Color="{DynamicResource DarkWarningColor}" Offset="0.5"/>
|
||||||
<GradientStop Color="White" Offset="0.5"/>
|
<GradientStop Color="{DynamicResource BackgroundColor}" Offset="0.5"/>
|
||||||
<GradientStop Color="White" Offset="1"/>
|
<GradientStop Color="{DynamicResource BackgroundColor}" Offset="1"/>
|
||||||
</LinearGradientBrush>
|
</LinearGradientBrush>
|
||||||
</GeometryDrawing.Brush>
|
</GeometryDrawing.Brush>
|
||||||
<GeometryDrawing.Geometry>
|
<GeometryDrawing.Geometry>
|
||||||
@@ -162,8 +163,8 @@
|
|||||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
||||||
<GradientStop Color="{DynamicResource DarkDangerColor}" Offset="0"/>
|
<GradientStop Color="{DynamicResource DarkDangerColor}" Offset="0"/>
|
||||||
<GradientStop Color="{DynamicResource DarkDangerColor}" Offset="0.5"/>
|
<GradientStop Color="{DynamicResource DarkDangerColor}" Offset="0.5"/>
|
||||||
<GradientStop Color="White" Offset="0.5"/>
|
<GradientStop Color="{DynamicResource BackgroundColor}" Offset="0.5"/>
|
||||||
<GradientStop Color="White" Offset="1"/>
|
<GradientStop Color="{DynamicResource BackgroundColor}" Offset="1"/>
|
||||||
</LinearGradientBrush>
|
</LinearGradientBrush>
|
||||||
</GeometryDrawing.Brush>
|
</GeometryDrawing.Brush>
|
||||||
<GeometryDrawing.Geometry>
|
<GeometryDrawing.Geometry>
|
||||||
@@ -223,14 +224,43 @@
|
|||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="ProgressBar">
|
<ControlTemplate TargetType="ProgressBar">
|
||||||
<controls:SimplePanel x:Name="TemplateRoot" SnapsToDevicePixels="true">
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="IsIndeterminate" 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>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<controls:SimplePanel x:Name="TemplateRoot" SnapsToDevicePixels="true" ClipToBounds="True">
|
||||||
<Rectangle x:Name="PART_Track" Fill="{TemplateBinding Background}" StrokeThickness="0" Stroke="{TemplateBinding BorderBrush}"/>
|
<Rectangle x:Name="PART_Track" Fill="{TemplateBinding Background}" StrokeThickness="0" Stroke="{TemplateBinding BorderBrush}"/>
|
||||||
<Decorator x:Name="PART_Indicator" HorizontalAlignment="Left">
|
<Decorator x:Name="PART_Indicator" HorizontalAlignment="Left">
|
||||||
<Rectangle x:Name="Indicator" Fill="{TemplateBinding Foreground}"/>
|
<Rectangle x:Name="Indicator" Fill="{TemplateBinding Foreground}"/>
|
||||||
</Decorator>
|
</Decorator>
|
||||||
|
<Rectangle x:Name="Animation" Visibility="Collapsed" Fill="{TemplateBinding Foreground}" RenderTransformOrigin="0.5,0.5">
|
||||||
|
<Rectangle.RenderTransform>
|
||||||
|
<TransformGroup>
|
||||||
|
<ScaleTransform/>
|
||||||
|
</TransformGroup>
|
||||||
|
</Rectangle.RenderTransform>
|
||||||
|
</Rectangle>
|
||||||
</controls:SimplePanel>
|
</controls:SimplePanel>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsIndeterminate" Value="true">
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource IsIndeterminate}"/>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Setter Property="Visibility" TargetName="Indicator" Value="Collapsed"/>
|
||||||
|
<Setter Property="Visibility" TargetName="Animation" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
<Trigger Property="Orientation" Value="Vertical">
|
<Trigger Property="Orientation" Value="Vertical">
|
||||||
|
<Setter Property="Height" Value="{x:Static system:Double.NaN}"/>
|
||||||
<Setter Property="LayoutTransform" TargetName="TemplateRoot">
|
<Setter Property="LayoutTransform" TargetName="TemplateRoot">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<RotateTransform Angle="-90"/>
|
<RotateTransform Angle="-90"/>
|
||||||
|
|||||||
Reference in new issue
Block a user