Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <Style x:Key="ProgressRingStyle" TargetType="ProgressRing">
- <Setter Property="Background" Value="#00FFFFFF" />
- <Setter Property="Foreground" Value="{ThemeResource SystemControlHighlightAccentBrush}" />
- <Setter Property="IsHitTestVisible" Value="False" />
- <Setter Property="HorizontalAlignment" Value="Center" />
- <Setter Property="VerticalAlignment" Value="Center" />
- <Setter Property="MinHeight" Value="24" />
- <Setter Property="MinWidth" Value="24" />
- <Setter Property="IsTabStop" Value="False" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="ProgressRing">
- <Grid x:Name="Ring"
- Padding="{TemplateBinding Padding}"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- FlowDirection="LeftToRight"
- RenderTransformOrigin="0.5,0.5"
- Visibility="Collapsed">
- <Grid.MaxWidth>
- <Binding Path="TemplateSettings.MaxSideLength">
- <Binding.RelativeSource>
- <RelativeSource Mode="TemplatedParent" />
- </Binding.RelativeSource>
- </Binding>
- </Grid.MaxWidth>
- <Grid.MaxHeight>
- <Binding Path="TemplateSettings.MaxSideLength">
- <Binding.RelativeSource>
- <RelativeSource Mode="TemplatedParent" />
- </Binding.RelativeSource>
- </Binding>
- </Grid.MaxHeight>
- <Grid.Resources>
- <Style x:Key="ProgressRingEllipseStyle" TargetType="Ellipse">
- <Setter Property="Width" Value="6" />
- <Setter Property="Height" Value="6" />
- <Setter Property="HorizontalAlignment" Value="Center" />
- <Setter Property="VerticalAlignment" Value="Top" />
- <Setter Property="RenderTransformOrigin" Value="0.5,0.5" />
- </Style>
- </Grid.Resources>
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup x:Name="SizeStates">
- <VisualStateGroup.States>
- <VisualState x:Name="Large" />
- <VisualState x:Name="Small" />
- </VisualStateGroup.States>
- </VisualStateGroup>
- <VisualStateGroup x:Name="ActiveStates">
- <VisualState x:Name="Inactive" />
- <VisualState x:Name="Active">
- <Storyboard RepeatBehavior="Forever">
- <ObjectAnimationUsingKeyFrames Duration="0" TargetName="Ring" TargetProperty="Visibility">
- <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
- </ObjectAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames TargetName="Ellipse01_S24" TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)">
- <EasingDoubleKeyFrame KeyTime="0" Value="1" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:0.47" Value="0.6" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,1,1" KeyTime="0:0:0.73" Value="0.7" />
- <SplineDoubleKeyFrame KeySpline="0.8,0,0.78,1" KeyTime="0:0:1.02" Value="1.1" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0,1" KeyTime="0:0:1.4" Value="1" />
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames TargetName="Ellipse01_S24" TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)">
- <EasingDoubleKeyFrame KeyTime="0" Value="1" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:0.47" Value="0.6" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,1,1" KeyTime="0:0:0.73" Value="0.7" />
- <SplineDoubleKeyFrame KeySpline="0.8,0,0.78,1" KeyTime="0:0:1.02" Value="1.1" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0,1" KeyTime="0:0:1.4" Value="1" />
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames TargetName="Ellipse01Grid_S24" TargetProperty="(UIElement.RenderTransform).(CompositeTransform.Rotation)">
- <DoubleAnimationUsingKeyFrames.KeyFrames>
- <EasingDoubleKeyFrame KeyTime="0" Value="0" />
- <SplineDoubleKeyFrame KeySpline="0.65,0.21,0.25,0.76" KeyTime="0:0:1.4" Value="360" />
- </DoubleAnimationUsingKeyFrames.KeyFrames>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames TargetName="Ellipse02_S24" TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)">
- <DoubleAnimationUsingKeyFrames.KeyFrames>
- <EasingDoubleKeyFrame KeyTime="0" Value="0.8" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:0.07" Value="1" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:0.53" Value="0.6" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:0.8" Value="0.7" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:1.02" Value="0.8" />
- </DoubleAnimationUsingKeyFrames.KeyFrames>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames TargetName="Ellipse02_S24" TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)">
- <DoubleAnimationUsingKeyFrames.KeyFrames>
- <EasingDoubleKeyFrame KeyTime="0" Value="0.8" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:0.07" Value="1" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:0.53" Value="0.6" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:0.8" Value="0.7" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:1.02" Value="0.8" />
- </DoubleAnimationUsingKeyFrames.KeyFrames>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames TargetName="Ellipse02Grid_S24" TargetProperty="(UIElement.RenderTransform).(CompositeTransform.Rotation)">
- <DoubleAnimationUsingKeyFrames.KeyFrames>
- <EasingDoubleKeyFrame KeyTime="0" Value="0" />
- <SplineDoubleKeyFrame KeySpline="0.76,0.21,0.25,0.76" KeyTime="0:0:1.4" Value="360" />
- </DoubleAnimationUsingKeyFrames.KeyFrames>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames TargetName="Ellipse03_S24" TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)">
- <DoubleAnimationUsingKeyFrames.KeyFrames>
- <EasingDoubleKeyFrame KeyTime="0" Value="0.8" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:0.13" Value="1" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:0.6" Value="0.6" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:0.87" Value="0.7" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:1.02" Value="0.8" />
- </DoubleAnimationUsingKeyFrames.KeyFrames>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames TargetName="Ellipse03_S24" TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)">
- <DoubleAnimationUsingKeyFrames.KeyFrames>
- <EasingDoubleKeyFrame KeyTime="0" Value="0.8" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:0.13" Value="1" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:0.6" Value="0.6" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:0.87" Value="0.7" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:1.02" Value="0.8" />
- </DoubleAnimationUsingKeyFrames.KeyFrames>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames TargetName="Ellipse03Grid_S24" TargetProperty="(UIElement.RenderTransform).(CompositeTransform.Rotation)">
- <DoubleAnimationUsingKeyFrames.KeyFrames>
- <EasingDoubleKeyFrame KeyTime="0" Value="0" />
- <SplineDoubleKeyFrame KeySpline="0.88,0.21,0.25,0.76" KeyTime="1,4" Value="360" />
- </DoubleAnimationUsingKeyFrames.KeyFrames>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames TargetName="Ellipse04_S24" TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)">
- <DoubleAnimationUsingKeyFrames.KeyFrames>
- <EasingDoubleKeyFrame KeyTime="0" Value="0.8" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:0.2" Value="1" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:0.67" Value="0.6" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:0.93" Value="0.7" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:1.02" Value="0.8" />
- </DoubleAnimationUsingKeyFrames.KeyFrames>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames TargetName="Ellipse04_S24" TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)">
- <DoubleAnimationUsingKeyFrames.KeyFrames>
- <EasingDoubleKeyFrame KeyTime="0" Value="0.8" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:0.2" Value="1" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:0.67" Value="0.6" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:0.93" Value="0.7" />
- <SplineDoubleKeyFrame KeySpline="0.33,0,0.67,1" KeyTime="0:0:1.02" Value="0.8" />
- </DoubleAnimationUsingKeyFrames.KeyFrames>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames TargetName="Ellipse04Grid_S24" TargetProperty="(UIElement.RenderTransform).(CompositeTransform.Rotation)">
- <DoubleAnimationUsingKeyFrames.KeyFrames>
- <EasingDoubleKeyFrame KeyTime="0" Value="0" />
- <SplineDoubleKeyFrame KeySpline="1,0.2,0.25,0.76" KeyTime="1,4" Value="360" />
- </DoubleAnimationUsingKeyFrames.KeyFrames>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </VisualState>
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- <Grid x:Name="Spinner_24x24" Width="24" Height="24" HorizontalAlignment="Center" VerticalAlignment="Center">
- <Grid x:Name="Ellipse01Grid_S24" RenderTransformOrigin="0.5,0.5">
- <Grid.RenderTransform>
- <CompositeTransform />
- </Grid.RenderTransform>
- <Ellipse x:Name="Ellipse01_S24" Style="{StaticResource ProgressRingEllipseStyle}" Fill="{TemplateBinding Foreground}">
- <Ellipse.RenderTransform>
- <CompositeTransform />
- </Ellipse.RenderTransform>
- </Ellipse>
- </Grid>
- <Grid x:Name="Ellipse02Grid_S24" RenderTransformOrigin="0.5,0.5">
- <Grid.RenderTransform>
- <CompositeTransform />
- </Grid.RenderTransform>
- <Ellipse x:Name="Ellipse02_S24" Style="{StaticResource ProgressRingEllipseStyle}" Fill="{TemplateBinding Foreground}">
- <Ellipse.RenderTransform>
- <CompositeTransform />
- </Ellipse.RenderTransform>
- </Ellipse>
- </Grid>
- <Grid x:Name="Ellipse03Grid_S24" RenderTransformOrigin="0.5,0.5">
- <Grid.RenderTransform>
- <CompositeTransform />
- </Grid.RenderTransform>
- <Ellipse x:Name="Ellipse03_S24" Style="{StaticResource ProgressRingEllipseStyle}" Fill="{TemplateBinding Foreground}">
- <Ellipse.RenderTransform>
- <CompositeTransform />
- </Ellipse.RenderTransform>
- </Ellipse>
- </Grid>
- <Grid x:Name="Ellipse04Grid_S24" RenderTransformOrigin="0.5,0.5">
- <Grid.RenderTransform>
- <CompositeTransform />
- </Grid.RenderTransform>
- <Ellipse x:Name="Ellipse04_S24" Style="{StaticResource ProgressRingEllipseStyle}" Fill="{TemplateBinding Foreground}">
- <Ellipse.RenderTransform>
- <CompositeTransform />
- </Ellipse.RenderTransform>
- </Ellipse>
- </Grid>
- </Grid>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement