| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:UI="clr-namespace:CustomUI"
- xmlns:ec="http://schemas.microsoft.com/expression/2010/controls"
- xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing">
- <ControlTemplate x:Key="DoubleArc"
- TargetType="{x:Type UI:Loading}">
- <Grid x:Name="PART_Root" Background="{TemplateBinding Background}">
- <ed:Arc x:Name="PART_OutCircle" ArcThickness="5" ArcThicknessUnit="Pixel" EndAngle="360"
- Fill="{TemplateBinding Foreground}"
- Opacity="1" RenderTransformOrigin="0.5,0.5" StartAngle="90" Stretch="None">
- <ed:Arc.RenderTransform>
- <RotateTransform />
- </ed:Arc.RenderTransform>
- </ed:Arc>
- <ed:Arc x:Name="PART_InnerCircle" Margin="5" ArcThickness="5" ArcThicknessUnit="Pixel"
- EndAngle="150"
- Fill="{TemplateBinding Foreground}"
- Opacity="0.4" RenderTransformOrigin="0.5,0.5" StartAngle="-60" Stretch="None">
- <ed:Arc.RenderTransform>
- <RotateTransform />
- </ed:Arc.RenderTransform>
- </ed:Arc>
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup x:Name="ActiveStates">
- <VisualState x:Name="Inactive" />
- <VisualState x:Name="Active">
- <Storyboard SpeedRatio="{TemplateBinding SpeedRatio}">
- <DoubleAnimationUsingKeyFrames RepeatBehavior="Forever" Storyboard.TargetName="PART_OutCircle" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)">
- <LinearDoubleKeyFrame KeyTime="0:0:0.000" Value="0" />
- <LinearDoubleKeyFrame KeyTime="0:0:3.000" Value="360" />
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames RepeatBehavior="Forever" Storyboard.TargetName="PART_InnerCircle" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)">
- <LinearDoubleKeyFrame KeyTime="0:0:0.000" Value="0" />
- <LinearDoubleKeyFrame KeyTime="0:0:3.000" Value="-360" />
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </VisualState>
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- </Grid>
- </ControlTemplate>
- </ResourceDictionary>
|