Article From:https://www.cnblogs.com/lonelyxmas/p/9689220.html
WPF circular Loading animation

Copyright notice: This article is an original article for bloggers. It can not be reproduced without permission from bloggers. Https://blog.csdn.net/yangyisen0713/article/details/18218167

WPFCreate a Loading animation that mimics Silverlight and win8, and you can actually use WPF’s ellipse. If you want something simple or better, use Blend.

xamlCode:

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        x:Class="LoadingAnimation.Window1 "x:Name=" Window "Title=" Window1 "Width=" 640 "Height=" 480 "Xmlns:d= "http://schemAs.microsoft.com/expression/blend/2008 "Xmlns:mc= "http://schemas.openxmlformats.org/markup-compatibility/2006 "Mc:Ignorable= "d" >< Window.Resources>< StoryBoard x:Key= "Storyboard1" >< DoubleAnimationUsingKeyFrames BeginTime= "00:00:00" RePeatBehavior= "Forever" Storyboard.TargetName= "ellipse" Storyboard.TargetProperty= "(UIElement.Opacity)">< SplineDoubleKeyFrame KeyTime= "00:00:00" Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:00.1000000" Value= "0" />< SplineDoubLeKeyFrame KeyTime= "00:00:00.5000000" Value= "1" />< SplineDoubleKeyFrame KeyTIme= "00:00:01" Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:02.7000000"Value= "0" />< /DoubleAnimationUsingKeyFrames>< DoubleAnimationUsingKeyFrames BeginTime= "00:00:00" Storyboard.TargetProperty= "(UIElement.Opacity)" RepeatBehavior= "Forever "Storyboard.TargetName=" ellipse1 ">";< SplineDoubleKeyFrame KeyTime= "00:00:00 "Value=" 0 "/>";< SplineDoubleKeyFrame KeyTime= "00:00:00.2000000" Value= "0"/>< SplineDoubleKeyFrame KeyTime= "00:00:00.6000000" Value= "1" />< SplineDoubleKeyFrame KeyTime= "00:00:01.1000000" Value= "0" />< SPlineDoubleKeyFrame KeyTime= "00:00:02.7000000" Value= "0" />< /DoubleAnimationUsinGKeyFrames>< DoubleAnimationUsingKeyFrames BeginTime= "00:00:00" Storyboard.TargetProperty= "(UIElement.Opacity)" RepeatBehavior= "Forever" Storyboard.TargetName= "ellipse2" >< SplineDoubleKeyFrame KeyTime= "00:00:00" Value= "0" />< SplineDouBleKeyFrame KeyTime= "00:00:00.3000000" Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:00.7000000" Value= "1" />< SplineDoubleKeyFrame KeyTime= "00:00:01.2000000 "Value=" 0 "/>";< SplineDoubleKeyFrame KeyTime= "00:00:02.7000000" Value="0" />< /DoubleAnimationUsingKeyFrames>< DoubleAnimationUsingKEyFrames BeginTime= "00:00:00" Storyboard.TargetProperty= "(UIElement.Opacity)" RepeatBehavior= "Foreve"R "Storyboard.TargetName=" ellipse3 ">";< SplineDoubleKeyFrame KeyTime= "00:00:00"Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:00.4000000" Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:00.8000000" Value= "1" />< SplineDoubleKeyFrame KeyTime= "00:00:01.3000000" Value= "0" />< SplineDOubleKeyFrame KeyTime= "00:00:02.7000000" Value= "0" />< /DoubleAnimationUsingKeyFrAmes>< DoubleAnimationUsingKeyFrames BeginTime= "00:00:00" Storyboard.TargetProperTy= "(UIElement.Opacity)" RepeatBehavior= "Forever" Storyboard.TargetName= "ellipse4" >< SplineDoubleKeyFrame KeyTime= "00:00:00" Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:00.5000000" Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:00.9000000 "Value=" 1 "/>";< SplineDoubleKeyFrame KeyTime= "00:00:01.4000000 "Value=" 0 "/>";< SplineDoubleKeyFrame KeyTime= "00:00:02.7000000" Value= "0" / /Gt;< /DoubleAnimationUsingKeyFrames>< DoubleAnimationUsingKeyFramEs BeginTime= "00:00:00" Storyboard.TargetProperty= "(UIElement.Opacity)" RepeatBehavior= "Forever" StoRyboard.TargetName= "ellipse5" >< SplineDoubleKeyFrame KeyTime= "00:00:00" Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:00.6000000" Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:01" Value= "1" />< SplineDoubleKeyFrame KeyTime= "00:00:01.5000000" Value= "0" />< SplineDoubleKeyFrameKeyTime= "00:00:02.7000000" Value= "0" />< /DoubleAnimationUsingKeyFrames>< DoubleAnimationUsingKeyFrames BeginTime= "00:00:00" Storyboard.TargetProperty= "(UIElement).Opacity) "RepeatBehavior=" Forever "Storyboard.TargetName=" ellipse6 ">";< SplineDoubleKeyFrame KeyTime= "00:00:00" Value= "0" />< SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:01.1000000 "Value=" 1 "/>";< SplineDoubleKeyFrame KeyTime= "00:00:01.6000000" Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:02.7000000" Value= "0" />< /DoubleAnimationUsingKeyFrames>< DoubleAnimationUsingKeyFrames BeginTime= "00:00:00 "Storyboard.TargetProperty=" (UIElement.Opacity) "RepeatBehavior=" Forever "Storyboard.Target"Name= "ellipse7" >< SplineDoubleKeyFrame KeyTime= "00:00:00" Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:00.8000000" Value= "0" />≪ SplineDoubleKeyFrame KeyTime= "00:00:01.2000000" Value= "1" />< SplineDoubleKeyFrame KeyTime= "00:00:01.7000000" Value= "0" />< SplineDoubleKeyFrame KeyTimE= "00:00:02.7000000" Value= "0" />< /DoubleAnimationUsingKeyFrames>< DoubleAnimationUsingKeyFrames BeginTime= "00:00:00" Storyboard.TargetProperty= "(UIElement.Opaci)Ty) "RepeatBehavior=" Forever "Storyboard.TargetName=" ellipse8 ">";< SplineDoubleKeyFrame KeyTime= "00:00:00" Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:000.9000000 "Value=" 0 "/>";< SplineDoubleKeyFrame KeyTime= "00:00:01.3000000" VaLue= "1" />< SplineDoubleKeyFrame KeyTime= "00:00:01.8000000" Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:02.7000000" Value= "0" />< /DoubleAnimationUsingKeyFrames>< DoubleAnimationUsingKeyFrames BeginTime= "00:00:00 "Storyboard.TargetProperty=" (UIElement.Opacity) "RepeatBehavior=" Forever "Storyboard.TargetName="Ellipse9 ">< SplineDoubleKeyFrame KeyTime= "00:00:00" Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:01" Value= "0" />< SplineDoublEKeyFrame KeyTime= "00:00:01.4000000" Value= "1" />< SplineDoubleKeyFrame KeyTiMe= "00:00:01.9000000" Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:02.7000000 "Value=" 0 "/>";< /DoubleAnimationUsingKeyFrames>< DoubleAnImationUsingKeyFrames BeginTime= "00:00:00" Storyboard.TargetProperty= "(UIElement.Opacity)" RepeatBehAvior= "Forever" Storyboard.TargetName= "ellipse10" >< SplineDoubleKeyFrame KeyTIme= "00:00:00" Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:01.1000000"Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:01.5000000" Value= "1" />< SplineDoubleKeyFrame KeyTime= "00:00:02" Value= "0" />< SPlineDoubleKeyFrame KeyTime= "00:00:02.7000000" Value= "0" />< /DoubleAnimationUsinGKeyFrames>< DoubleAnimationUsingKeyFrames BeginTime= "00:00:00" Storyboard.TargetProperty= "(UIElement.Opacity)" RepeatBehavior= "Forever" Storyboard.TargetName= "ellipse11" >< SplineDoubleKeyFrame KeyTime= "00:00:00" Value= "0" />< SplineDoUbleKeyFrame KeyTime= "00:00:01.2000000" Value= "0" />< SplineDoubleKeyFrame KeYTime= "00:00:01.6000000" Value= "1" />< SplineDoubleKeyFrame KeyTime= "00:00:02.1000000 "Value=" 0 "/>";< SplineDoubleKeyFrame KeyTime= "00:00:02.7000000" Value= "0" />< /DoubleAnimationUsingKeyFrames>< DoubleAnimationUsingKeyFrames BeginTime= "00:00:00" Storyboard.TargetProperty= "(UIElement.Opacity)" RepeatBehavior= "Forev"Er "Storyboard.TargetName=" ellipse12 ">";< SplineDoubleKeyFrame KeyTime= "00:00:00 "Value=" 0 "/>";< SplineDoubleKeyFrame KeyTime= "00:00:01.3000000" Value= "0" / /Gt;< SplineDoubleKeyFrame KeyTime= "00:00:01.7000000" Value= "1" />< SplineDoubleKeyFrame KeyTime= "00:00:02.2000000" Value= "0" />< SplinEDoubleKeyFrame KeyTime= "00:00:02.7000000" Value= "0" />< /DoubleAnimationUsingKeyFrames>< DoubleAnimationUsingKeyFrames BeginTime= "00:00:00" Storyboard.TargetPropErty= "(UIElement.Opacity)" RepeatBehavior= "Forever" Storyboard.TargetName= "ellipse13" >< SplineDoubleKeyFrame KeyTime= "00:00:00" Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:01.4000000" Value= "0" />< SplineDoubleKeyFrame KeyTimE= "00:00:01.8000000" Value= "1" />< SplineDoubleKeyFrame KeyTime= "00:00:02.3000000 "Value=" 0 "/>";< SplineDoubleKeyFrame KeyTime= "00:00:02.7000000" Value= "0"./>< /DoubleAnimationUsingKeyFrames>< DoubleAnimationUsingKeyFRames BeginTime= "00:00:00" Storyboard.TargetProperty= "(UIElement.Opacity)" RepeatBehavior= "Forever"Storyboard.TargetName= "ellipse14" >< SplineDoubleKeyFrame KeyTime= "00:00:00" VAlue= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:01.5000000" Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:01.9000000" Value= "1" />< SplineDoubleKeyFrame KeyTime= "00:00:02.4000000" Value= "0" />< SplineDouBleKeyFrame KeyTime= "00:00:02.7000000" Value= "0" />< /DoubleAnimationUsingKeyFramEs>< DoubleAnimationUsingKeyFrames BeginTime= "00:00:00" Storyboard.TargetProperty= "(UIElement.Opacity)" RepeatBehavior= "Forever" Storyboard.TargetName= "ellipse15" >< SplineDoubleKeyFrame KeyTime= "00:00:00" Value= "0" />< SplineDoubleKeyFRame KeyTime= "00:00:01.6000000" Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:02 "Value=" 1 "/>";< SplineDoubleKeyFrame KeyTime= "00:00:02.5000000" Value="0" />< SplineDoubleKeyFrame KeyTime= "00:00:02.7000000" Value= "0" />< /DoubleAnimationUsingKeyFrames>< DoubleAnimationUsingKeyFrames BeginTIme= "00:00:00" Storyboard.TargetProperty= "(UIElement.Opacity)" RepeatBehavior= "Forever" Storyboard.TArgetName= "ellipse16" >< SplineDoubleKeyFrame KeyTime= "00:00:00" Value= "0" /&gT;< SplineDoubleKeyFrame KeyTime= "00:00:01.7000000" Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:02.1000000" Value= "1" />< SplineDoubleKeyFrame KeyTime= "00:00:02.6000000" Value= "0" />< SplineDoubleKeyFrameKeyTime= "00:00:02.7000000" Value= "0" />< /DoubleAnimationUsingKeyFrames>< DoubleAnimationUsingKeyFrames BeginTime= "00:00:00" Storyboard.TargetProperty= "(UIElement).Opacity) "RepeatBehavior=" Forever "Storyboard.TargetName=" ellipse17 ">";< SplinEDoubleKeyFrame KeyTime= "00:00:00" Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:01.8000000" Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:02.2000000 "Value=" 1 "/>";< SplineDoubleKeyFrame KeyTime= "00:00:02.7000000" Value= "0"./>< /DoubleAnimationUsingKeyFrames>< DoubleAnimationUsingKeyFrAmes BeginTime= "00:00:00" RepeatBehavior= "Forever" Storyboard.TargetName= "border" Storyboard.TargetPRoperty= "(UIElement.RenderTransform). (TransformGroup.Children) [2]. (RotateTransform.Angle)" >< SplineDoubleKeyFrame KeyTime= "00:00:00" Value= "0" />< SplineDOubleKeyFrame KeyTime= "00:00:00.5000000" Value= "180" />< SplineDoubleKeyFrameKeyTime= "00:00:01" Value= "360" />< /DoubleAnimationUsingKeyFrames>< DoubleAnimationUsingKeyFrames BeginTime= "00:00:00" RepeatBehavior= "Forever" Storyboard.TargetName= "border1" Storyboard.TargetProperty= "(UIElement.RenderTransform). (TransformGroup.Children) [2]. (RotateTransform.Angle) ">";< SplineDoubleKeyFrame KeyTime= "00:00:00" Value= "0" />< SplineDoubleKeyFrame KeyTime= "00:00:02" Value= "180" />< SplineDoubleKeyFrame KeyTime= "00:00:04" Value= "360" />< /DoubleAnimationUsinGKeyFrames>< /Storyboard>< /Window.Resources>< Window.TriggerS>< EventTrigger RoutedEvent= "FrameworkElement.Loaded" >< BeginStorYboard Storyboard= "{StaticResource Storyboard1}" />< /EventTrigger>< /WindOw.Triggers>< Grid x:Name= "LayoutRoot" Background= "Black" >< Viewbox WidtH= "8" Height= "8" >< Grid HorizontalAlignment= "Center" x:Name= "loading" Margin= "0".VerticalAlignment= "Center" Width= "3.333" Height= "3.333" Visibility= "Visible" >&lT; Ellipse RenderTransformOrigin= "0.468,3.443" x:Name= "ellipse" Fill= "RoyalBlue" Stroke= "{x:Null}" d:IsHidden= "True" />< Ellipse RenderTransformOrigin= "0.468,3.443" Fill= "RoyalBl"UE "Stroke=" {x:Null} "x:Name=" ellipse1 "d:IsHidden=" True ">";< Ellipse.RendeRTransform>< TransformGroup>< ScalETransform ScaleX= "1" ScaleY= "1" />< SkewTransform AngleX= "0" AngLeY= "0" />< RotateTransform Angle= "20" />< TranslateTransform X= "0" Y= "0" />< /TransformGroup>< /Ellipse.RenderTransform>< /Ellipse>< Ellipse RenderTransformOrigin= "0.468,3.443" Fill= "RoyalBlue" Stroke= "{x:Null}" x:Name= "ellip"Se2 "d:IsHidden=" True ">";< Ellipse.RenderTransform>< TransformGroup>< ScaleTransform ScaleX= "1" ScaleY= "1" / /Gt;< SkewTransform AngleX= "0" AngleY= "0" />< RotateTransform Angle= "40" />< TranslateTransform X= "0 "Y=" 0 "/>";< /TransformGroup>< /Ellipse.ReNderTransform>< /Ellipse>< Ellipse RenderTransformOrigIn= "0.468,3.443" Fill= "RoyalBlue" Stroke= "{x:Null}" x:Name= "ellipse3" d:IsHidden= "True" >< Ellipse.RenderTransform>< TransformGroup>< ScaleTransform ScaleX= "1" ScaleY= "1" />&lT; SkewTransform AngleX= "0" AngleY= "0" />< RotateTransform Angle= "60 "/>< TranslateTransform X= "0" Y= "0" />< /TransformGroup>< /Ellipse.RenderTransform>< /Ellipse>< Ellipse RenderTransformOrigin= "0.468,3.443" Fill= "RoyalBlue" STroke= "{x:Null}" x:Name= "ellipse4" d:IsHidden= "True" >< Ellipse.RenderTranSform>< TransformGroup>< ScaleTranSform ScaleX= "1" ScaleY= "1" />< SkewTransform AngleX= "0" AngleY= "0 "/>< RotateTransform Angle= "80" />< TranslateTransform X= "0" Y= "0" />< /TransformGroup>< /Ellipse.RenderTransform>< /Ellipse>≪ Ellipse RenderTransformOrigin= "0.468,3.443" Fill= "RoyalBlue" Stroke= "{x:Null}" x:Name= "ellipse5"D:IsHidden= "True" >< Ellipse.RenderTransform>< TransformGroup>< ScaleTransform ScaleX= "1" ScaleY= "1" />< SkewTransform AngleX= "0" AngleY= "0" />< RotateTransform Angle= "100" />< TranslateTransform X= "0" Y= "0" />< /TransformGroup>< /Ellipse.RenderTransform>< /Ellipse>< Ellipse RenderTransformOrigin= "0.468,3.443 "Fill=" RoyalBlue "Stroke=" {x:Null} "x:Name=" ellipse6 "d:IsHidden=" True ">";< Ellipse.RenderTransform>< TransformGroup>< ScaleTransform ScaleX= "1" ScaleY= "1" />< SkEwTransform AngleX= "0" AngleY= "0" />< RotateTransform Angle= "120"/>< TranslateTransform X= "0" Y= "0" />< /TransformGroup>< /Ellipse.RenderTransform>< /Ellipse>< Ellipse RenderTransformOrigin= "0.468,3.443" Fill= "RoyalBlue" StroKe= "{x:Null}" x:Name= "ellipse7" d:IsHidden= "True" >< Ellipse.RenderTransfoRm>< TransformGroup>< ScaleTransfoRM ScaleX= "1" ScaleY= "1" />< SkewTransform AngleX= "0" AngleY= "0"./>< RotateTransform Angle= "140" />< TranslateTransform X= "0" Y= "0" />< /TransformGroup>< /Ellipse.RenderTransform>< /Ellipse>< Ellipse RenderTransformOrigin= "0.468,3.443" Fill= "RoyalBlue" Stroke= "{x:Null}" x:Name= "ellipse8" d:IsHidden= "True" >< Ellipse.RenderTransform>&lT; TransformGroup>< ScaleTransform ScaleX= "1" ScaleY= "1" />< SkewTransform AngleX= "0" AngleY= "0" />< RotateTransform Angle= "160" />< TranslateTransform X= "0" Y= "0 "/>< /TransformGroup>< /Ellipse.RenderTrAnsform>< /Ellipse>< Ellipse RenderTransformOrigin= "0.468,3.443 "Fill=" RoyalBlue "Stroke=" {x:Null} "x:Name=" ellipse9 "d:IsHidden=" True ">";< Ellipse.RenderTransform>< TransformGroup>< ScaleTransform ScaleX= "1" ScaleY= "1" />< SkewTransform AngleX= "0" AngleY= "0" />< RotateTransform Angle= "180" />< TranslateTransform X= "0" Y= "0" />< /TransformGroup>< /Ellipse.RenderTransform>< /Ellipse>< Ellipse RenderTransformOrigin= "0.468,3.443" Fill= "RoyalBlue" Stroke= "{x:Null}" x:Name= "ellipse10" d:IsHidden= "True" >< Ellipse.RenderTransforM>< TransformGroup>< ScaleTransforM ScaleX= "1" ScaleY= "1" />< SkewTransform AngleX= "0" AngleY= "0" />< RotateTransform Angle= "200" />< TranslateTransform X= "0" Y= "0" />< /TransformGroup>< /Ellipse.RenderTransform>< /Ellipse><Ellipse RenderTransformOrigin= "0.468,3.443" Fill= "RoyalBlue" Stroke= "{x:Null}" x:Name= "ellipse11" d:IsHidden= "True" >< Ellipse.RenderTransform>&lT; TransformGroup>< ScaleTransform ScaleX= "1" ScaleY= "1" />< SkewTransform AngleX= "0" AngleY= "0" />< RotateTransform Angle= "220" />< TranslateTransform X= "0" Y= "0 "/>< /TransformGroup>< /Ellipse.RenderTrAnsform>< /Ellipse>< Ellipse RenderTransformOrigin= "0.468,3.443 "Fill=" RoyalBlue "Stroke=" {x:Null} "x:Name=" ellipse12 "d:IsHidden=" True ">";< Ellipse.RenderTransform>< TransformGroup>< ScaleTransform ScaleX= "1" ScaleY= "1" />< SkeWTransform AngleX= "0" AngleY= "0" />< RotateTransform Angle= "240"/>< TranslateTransform X= "0" Y= "0" />< /TransformGroup>< /Ellipse.RenderTransform></Ellipse>< Ellipse RenderTransformOrigin= "0.468,3.443" Fill= "RoyalBlue" StrokE= "{x:Null}" x:Name= "ellipse13" d:IsHidden= "True" >< Ellipse.RenderTransfoRm>< TransformGroup>< ScaleTransfoRM ScaleX= "1" ScaleY= "1" />< SkewTransform AngleX= "0" AngleY= "0"./>< RotateTransform Angle= "260" />< TranslateTransform X= "0" Y= "0" />< /TransformGroup>< /Ellipse.RenderTransform>< /Ellipse>< Ellipse RenderTransformOrigin= "0.468,3.443" Fill= "RoyalBlue" Stroke= "{x:Null}" x:Name= "ellipse14" dIsHidden= "True" >< Ellipse.RenderTransform>≪ TransformGroup>< ScaleTransform ScaleX= "1" ScaleY= "1" />< SkewTransform AngleX= "0" AngleY= "0" />< RotateTransform Angle= "280" />< TranslateTransform X= "0" Y="0" />< /TransformGroup>< /Ellipse.RenderTRansform>< /Ellipse>< Ellipse RenderTransformOrigin= "0.468,3.443 "Fill=" RoyalBlue "Stroke=" {x:Null} "x:Name=" ellipse15 "d:IsHidden=" True ">";< Ellipse.RenderTransform>< TransformGroup>< ScaleTransform ScaleX= "1" ScaleY= "1" />< SkEwTransform AngleX= "0" AngleY= "0" />< RotateTransform Angle= "300"/>< TranslateTransform X= "0" Y= "0" />< /TransformGroup>< /Ellipse.RenderTransform>< /Ellipse>< Ellipse RenderTransformOrigin= "0.468,3.443" Fill= "RoyalBlue" StroKe= "{x:Null}" x:Name= "ellipse16" d:IsHidden= "True" >< Ellipse.RenderTransfOrm>< TransformGroup>< ScaleTransfORM ScaleX= "1" ScaleY= "1" />< SkewTransform AngleX= "0" AngleY= "0"./>< RotateTransform Angle= "320" />< TranslateTransform X= "0" Y= "0" />< /TransformGroup>< /Ellipse.RenderTransform>< /Ellipse>&lT; Ellipse RenderTransformOrigin= "0.468,3.443" Fill= "RoyalBlue" Stroke= "{x:Null}" x:Name= "ellipse17"D:IsHidden= "True" >< Ellipse.RenderTransform>< TransformGroup>< ScaleTransform ScaleX= "1" ScaleY= "1" />< SkewTransform AngleX= "0" AngleY= "0" />< RotateTransform Angle= "340" />< TranslateTransform X= "0" Y= "0" />< /TransformGroup>< /Ellipse.RenderTransform>< /Ellipse>< Ellipse RenderTransformOrigin= "0.5,0.499 "x:Name=" ellipse_Copy "Fill=" RoyalBlue "Stroke=" {x:Null} "Margin=" -0.012,0,0.001, -9.67 "Ve"RticalAlignment= "Bottom" Height= "3.344" >< Ellipse.RenderTransform>< TransformGroup>< ScaleTransform ScaleX="1" ScaleY= "1" />< SkewTransform AngleX= "0" AngleY= "0" />< RotateTransform Angle= "0" />< TranslAteTransform X= "0" Y= "0" />< /TransformGroup>< /Ellipse.RenderTransform>< /Ellipse>< Border RendErTransformOrigin= "0.492,1.006" Margin= "1.081,0,1.086, -8.056" x:Name= "border" VerticalAlignment= "Bot"Tom "Height=" 8.622 "Background=" RoyalBlue "CornerRadius=" 1,1,0,0 ">";< BordeR.RenderTransform>< TransformGroup>≪ ScaleTransform ScaleX= "1" ScaleY= "1" />< SkewTransform AngleX="0" AngleY= "0" />< RotateTransform Angle= "0" />< TranslateTransform X= "0" Y= "0" />< /TransformGroup>< /Border.RenderTransform>< /Border>< Border Height= "4.994" Background= "RoyalBlue" CornerRadius= "1,1,0,0" RenderTransformOrigiN= "0.496,1.001" Margin= "0.705,0,0.714, -8.058" x:Name= "border1" VerticalAlignment= "Bottom" >< Border.RenderTransform>< TransformGroup>< ScaleTransform ScaleX= "1" ScaleY= "1" />≪ SkewTransform AngleX= "0" AngleY= "0" />< RotateTransform Angle="0" />< TranslateTransform X= "0" Y= "0" />< /TransformGroup>< /Border.RenderTransform>≪ /Border>< /Grid>< /Viewbox>< /Grid>< /Window≫

Here is a foreigner written with pointer rotation, do not want to add can not add, the effect is as follows:


Link of this Article: WPF round Loading animation

Leave a Reply

Your email address will not be published. Required fields are marked *