| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205 |
- <UserControl x:Name="panBack" x:Class="Loading"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:sys="clr-namespace:System;assembly=mscorlib"
- xmlns:my="clr-namespace:pcl"
- mc:Ignorable="d" Height="50" Width="50" MinWidth="50" MinHeight="50" MaxWidth="50" MaxHeight="50" BorderBrush="{DynamicResource Color4}">
- <Grid Width = "50" Height = "50">
- <Grid.Resources>
- <!-- Value Converters -->
- <!-- Particle Styling ,must to has RelativeSource -->
- <SolidColorBrush x:Key = "ParticleBackgroundColor" Color = "Transparent"/>
- <sys:Double x:Key = "ParticleOpacity">1</sys:Double>
- <sys:Double x:Key = "ParticleRadius">5</sys:Double>
- <sys:Double x:Key = "StartingPointX">0</sys:Double>
- <sys:Double x:Key = "StartingPointY">-20</sys:Double>
- <sys:Double x:Key = "RotationPointX">0.5</sys:Double>
- <sys:Double x:Key = "RotationPointY">0.5</sys:Double>
- <!-- Particle Origin Angles -->
- <sys:Double x:Key = "ParticleOriginAngleP0">205</sys:Double>
- <sys:Double x:Key = "ParticleOriginAngleP1">199</sys:Double>
- <sys:Double x:Key = "ParticleOriginAngleP2">193</sys:Double>
- <sys:Double x:Key = "ParticleOriginAngleP3">187</sys:Double>
- <sys:Double x:Key = "ParticleOriginAngleP4">181</sys:Double>
- <Style x:Key = "EllipseStyle" TargetType = "Ellipse">
- <Setter Property = "Width" Value = "{StaticResource ParticleRadius}"/>
- <Setter Property = "Height" Value = "{StaticResource ParticleRadius}"/>
- <Setter Property = "Fill" Value = "{Binding BorderBrush, ElementName=panBack}"/>
- <Setter Property = "RenderTransformOrigin" Value = "0.5, 0.5"/>
- <Setter Property = "Opacity" Value = "{StaticResource ParticleOpacity}"/>
- </Style>
- </Grid.Resources>
- <Canvas Width = "1" Height = "1" Margin="0,0,0,0">
- <Canvas.Triggers>
- <EventTrigger RoutedEvent = "Canvas.Loaded">
- <EventTrigger.Actions>
- <BeginStoryboard>
- <Storyboard BeginTime = "0:0:0.0" Duration = "0:0:6.6" RepeatBehavior = "Forever" TargetName = "p0" TargetProperty = "(UIElement.RenderTransform).(RotateTransform.Angle)">
- <DoubleAnimationUsingKeyFrames BeginTime = "00:00:00.000" Duration = "0:0:6.6">
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="300" KeyTime="0:0:1.1"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="600" KeyTime="0:0:2.2"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="900" KeyTime="0:0:3.3"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="1200" KeyTime="0:0:4.4"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="1500" KeyTime="0:0:5.5"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="1800" KeyTime="0:0:6.6"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </BeginStoryboard>
- <BeginStoryboard>
- <Storyboard BeginTime = "0:0:0.16" Duration = "0:0:6.6" RepeatBehavior = "Forever" TargetName = "p1" TargetProperty = "(UIElement.RenderTransform).(RotateTransform.Angle)">
- <DoubleAnimationUsingKeyFrames BeginTime = "00:00:00.000" Duration = "0:0:6.6">
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="300" KeyTime="0:0:1.1"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="600" KeyTime="0:0:2.2"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="900" KeyTime="0:0:3.3"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="1200" KeyTime="0:0:4.4"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="1500" KeyTime="0:0:5.5"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="1800" KeyTime="0:0:6.6"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </BeginStoryboard>
- <BeginStoryboard>
- <Storyboard BeginTime = "0:0:0.32" Duration = "0:0:6.6" RepeatBehavior = "Forever" TargetName = "p2" TargetProperty = "(UIElement.RenderTransform).(RotateTransform.Angle)">
- <DoubleAnimationUsingKeyFrames BeginTime = "00:00:00.000" Duration = "0:0:6.6">
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="300" KeyTime="0:0:1.1"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="600" KeyTime="0:0:2.2"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="900" KeyTime="0:0:3.3"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="1200" KeyTime="0:0:4.4"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="1500" KeyTime="0:0:5.5"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="1800" KeyTime="0:0:6.6"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </BeginStoryboard>
- <BeginStoryboard>
- <Storyboard BeginTime = "0:0:0.48" Duration = "0:0:6.6" RepeatBehavior = "Forever" TargetName = "p3" TargetProperty = "(UIElement.RenderTransform).(RotateTransform.Angle)">
- <DoubleAnimationUsingKeyFrames BeginTime = "00:00:00.000" Duration = "0:0:6.6">
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="300" KeyTime="0:0:1.1"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="600" KeyTime="0:0:2.2"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="900" KeyTime="0:0:3.3"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="1200" KeyTime="0:0:4.4"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="1500" KeyTime="0:0:5.5"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="1800" KeyTime="0:0:6.6"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </BeginStoryboard>
- <BeginStoryboard>
- <Storyboard BeginTime = "0:0:0.64" Duration = "0:0:6.6" RepeatBehavior = "Forever" TargetName = "p4" TargetProperty = "(UIElement.RenderTransform).(RotateTransform.Angle)">
- <DoubleAnimationUsingKeyFrames BeginTime = "00:00:00.000" Duration = "0:0:6.6">
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="300" KeyTime="0:0:1.1"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="600" KeyTime="0:0:2.2"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="900" KeyTime="0:0:3.3"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="1200" KeyTime="0:0:4.4"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="1500" KeyTime="0:0:5.5"/>
- <SplineDoubleKeyFrame KeySpline="0.75,0.22 0.25,0.78" Value="1800" KeyTime="0:0:6.6"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger.Actions>
- </EventTrigger>
- </Canvas.Triggers>
- <Border
- x:Name = "p0"
- Background = "{StaticResource ParticleBackgroundColor}"
- Opacity = "{StaticResource ParticleOpacity}">
- <Border.RenderTransform>
- <RotateTransform/>
- </Border.RenderTransform>
- <Border.RenderTransformOrigin>
- <Point X = "{StaticResource RotationPointX}" Y = "{StaticResource RotationPointY}"/>
- </Border.RenderTransformOrigin>
- <Ellipse Style = "{StaticResource EllipseStyle}">
- <Ellipse.RenderTransform>
- <TransformGroup>
- <TranslateTransform X = "{StaticResource StartingPointX}" Y = "{StaticResource StartingPointY}"/>
- <RotateTransform Angle = "{StaticResource ParticleOriginAngleP0}"/>
- </TransformGroup>
- </Ellipse.RenderTransform>
- </Ellipse>
- </Border>
- <Border
- x:Name = "p1"
- Background = "{StaticResource ParticleBackgroundColor}"
- Opacity = "{StaticResource ParticleOpacity}">
- <Border.RenderTransform>
- <RotateTransform/>
- </Border.RenderTransform>
- <Border.RenderTransformOrigin>
- <Point X = "{StaticResource RotationPointX}" Y = "{StaticResource RotationPointY}"/>
- </Border.RenderTransformOrigin>
- <Ellipse Style = "{StaticResource EllipseStyle}">
- <Ellipse.RenderTransform>
- <TransformGroup>
- <TranslateTransform X = "{StaticResource StartingPointX}" Y = "{StaticResource StartingPointY}"/>
- <RotateTransform Angle = "{StaticResource ParticleOriginAngleP1}"/>
- </TransformGroup>
- </Ellipse.RenderTransform>
- </Ellipse>
- </Border>
- <Border
- x:Name = "p2"
- Background = "{StaticResource ParticleBackgroundColor}"
- Opacity = "{StaticResource ParticleOpacity}">
- <Border.RenderTransform>
- <RotateTransform/>
- </Border.RenderTransform>
- <Border.RenderTransformOrigin>
- <Point X = "{StaticResource RotationPointX}" Y = "{StaticResource RotationPointY}"/>
- </Border.RenderTransformOrigin>
- <Ellipse Style = "{StaticResource EllipseStyle}">
- <Ellipse.RenderTransform>
- <TransformGroup>
- <TranslateTransform X = "{StaticResource StartingPointX}" Y = "{StaticResource StartingPointY}"/>
- <RotateTransform Angle = "{StaticResource ParticleOriginAngleP2}"/>
- </TransformGroup>
- </Ellipse.RenderTransform>
- </Ellipse>
- </Border>
- <Border
- x:Name = "p3"
- Background = "{StaticResource ParticleBackgroundColor}"
- Opacity = "{StaticResource ParticleOpacity}">
- <Border.RenderTransform>
- <RotateTransform/>
- </Border.RenderTransform>
- <Border.RenderTransformOrigin>
- <Point X = "{StaticResource RotationPointX}" Y = "{StaticResource RotationPointY}"/>
- </Border.RenderTransformOrigin>
- <Ellipse Style = "{StaticResource EllipseStyle}">
- <Ellipse.RenderTransform>
- <TransformGroup>
- <TranslateTransform X = "{StaticResource StartingPointX}" Y = "{StaticResource StartingPointY}"/>
- <RotateTransform Angle = "{StaticResource ParticleOriginAngleP3}"/>
- </TransformGroup>
- </Ellipse.RenderTransform>
- </Ellipse>
- </Border>
- <Border
- x:Name = "p4"
- Background = "{StaticResource ParticleBackgroundColor}"
- Opacity = "{StaticResource ParticleOpacity}">
- <Border.RenderTransform>
- <RotateTransform/>
- </Border.RenderTransform>
- <Border.RenderTransformOrigin>
- <Point X = "{StaticResource RotationPointX}" Y = "{StaticResource RotationPointY}"/>
- </Border.RenderTransformOrigin>
- <Ellipse Style = "{StaticResource EllipseStyle}">
- <Ellipse.RenderTransform>
- <TransformGroup>
- <TranslateTransform X = "{StaticResource StartingPointX}" Y = "{StaticResource StartingPointY}"/>
- <RotateTransform Angle = "{StaticResource ParticleOriginAngleP4}"/>
- </TransformGroup>
- </Ellipse.RenderTransform>
- </Ellipse>
- </Border>
- </Canvas>
- </Grid>
- </UserControl>
|