Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 32 additions & 23 deletions src/Wpf.Ui/Controls/ProgressRing/ProgressRing.xaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!--
<!--
This Source Code Form is subject to the terms of the MIT License.
If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
Copyright (C) Leszek Pomianowski and WPF UI Contributors.
Expand Down Expand Up @@ -65,32 +65,41 @@
</controls:Arc>
</Grid>
<ControlTemplate.Triggers>
<EventTrigger SourceName="Arc" RoutedEvent="Loaded">
<BeginStoryboard Name="RotateStoryboard">
<Storyboard>
<DoubleAnimation
RepeatBehavior="Forever"
Storyboard.TargetName="Arc"
Storyboard.TargetProperty="(Canvas.RenderTransform).(RotateTransform.Angle)"
To="360"
Duration="0:0:2" />
<DoubleAnimation
AutoReverse="True"
RepeatBehavior="Forever"
Storyboard.TargetName="Arc"
Storyboard.TargetProperty="EndAngle"
From="100"
To="320"
Duration="0:0:5" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
<Trigger Property="IsEnabled" Value="True">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
RepeatBehavior="Forever"
Storyboard.TargetName="Arc"
Storyboard.TargetProperty="(Canvas.RenderTransform).(RotateTransform.Angle)"
To="360"
Duration="0:0:2" />

<DoubleAnimation
AutoReverse="True"
RepeatBehavior="Forever"
Storyboard.TargetName="Arc"
Storyboard.TargetProperty="EndAngle"
From="100"
To="320"
Duration="0:0:5" />
</Storyboard>
</BeginStoryboard>
<ResumeStoryboard BeginStoryboardName="RotateStoryboard" />
</Trigger.EnterActions>
<Trigger.ExitActions>
<PauseStoryboard BeginStoryboardName="RotateStoryboard" />
</Trigger.ExitActions>
</Trigger>
<Trigger Property="IsVisible" Value="True">
<Trigger.EnterActions>
<ResumeStoryboard BeginStoryboardName="RotateStoryboard" />
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard />
</BeginStoryboard>
<PauseStoryboard BeginStoryboardName="RotateStoryboard" />
<SeekStoryboard BeginStoryboardName="RotateStoryboard" Offset="0" />
</Trigger.ExitActions>
</Trigger>
</ControlTemplate.Triggers>
Expand Down
Loading