超炫酷的WPF实现Loading控件效果

2019-12-30 11:11:34刘景俊
  • From = "{StaticResource ParticleBeginAngle2}"  To = "{StaticResource ParticleEndAngle2}" 
  • BeginTime = "{StaticResource ParticleBeginTime2}"  Duration = "{StaticResource ParticleDuration2}"/> 
  • <DoubleAnimation  Storyboard.TargetName = "p4" 
  • Storyboard.TargetProperty = "(UIElement.RenderTransform).(RotateTransform.Angle)"  From = "{StaticResource ParticleBeginAngle3}" 
  • To = "{StaticResource ParticleEndAngle3}"  BeginTime = "{StaticResource ParticleBeginTime3}" 
  • Duration = "{StaticResource ParticleDuration3}"/>  </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}"/>