| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:UI="clr-namespace:CustomUI">
- <ControlTemplate x:Key="SingleRound"
- TargetType="{x:Type UI:Loading}">
- <Grid x:Name="PART_Root" Background="{TemplateBinding Background}">
- <Ellipse x:Name="PART_Ellipse"
- Fill="{TemplateBinding Foreground}"
- RenderTransformOrigin="0.5,0.5">
- <Ellipse.RenderTransform>
- <ScaleTransform />
- </Ellipse.RenderTransform>
- </Ellipse>
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup x:Name="ActiveStates">
- <VisualState x:Name="Inactive" />
- <VisualState x:Name="Active">
- <Storyboard Duration="0:0:1.500" RepeatBehavior="Forever"
- SpeedRatio="{TemplateBinding SpeedRatio}">
- <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_Ellipse" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)">
- <LinearDoubleKeyFrame KeyTime="0:0:0.000" Value="0" />
- <LinearDoubleKeyFrame KeyTime="0:0:1.500" Value="1" />
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_Ellipse" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)">
- <LinearDoubleKeyFrame KeyTime="0:0:0.000" Value="0" />
- <LinearDoubleKeyFrame KeyTime="0:0:1.500" Value="1" />
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimation Duration="0:0:1.500" From="1" Storyboard.TargetName="PART_Ellipse" Storyboard.TargetProperty="(UIElement.Opacity)"
- To="0" />
- </Storyboard>
- </VisualState>
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- </Grid>
- </ControlTemplate>
- </ResourceDictionary>
|