Repository navigation
Animation.Repeat property set to Forever plays only once #840
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingcomponents::animationsA collection of implicit, composition and connected animation helpers and builders.A collection of implicit, composition and connected animation helpers and builders.regressionWhat was working is now brokeWhat was working is now broke
Description
Describe the bug
I tried to use a repeating animation but it seems to only play once, ignoring the Forever option being set.
Steps to reproduce
This is all you need as code to reproduce the issue:
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Spacing="16">
<StackPanel.Resources>
<a:AnimationSet x:Key="PulsateAnimation">
<a:ScalarAnimation Target="Opacity" Duration="0:0:2" Repeat="Forever">
<a:ScalarKeyFrame Key="0" Value="1"/>
<a:ScalarKeyFrame Key="0.5" Value="0"/>
<a:ScalarKeyFrame Key="1" Value="1"/>
</a:ScalarAnimation>
</a:AnimationSet>
</StackPanel.Resources>
<Button Content="Click me to animate">
<i:Interaction.Behaviors>
<i:EventTriggerBehavior EventName="Click">
<b:StartAnimationAction Animation="{StaticResource PulsateAnimation}" TargetObject="{x:Bind StateIcon}"/>
</i:EventTriggerBehavior>
</i:Interaction.Behaviors>
</Button>
<FontIcon x:Name="StateIcon"
VerticalAlignment="Center"
Glyph="●"
FontFamily="{ThemeResource ContentControlThemeFontFamily}"
FontSize="14"
Foreground="{ThemeResource SystemFillColorCautionBrush}">
</FontIcon>
</StackPanel>Expected behavior
I would expect the Forever value for the Repeat property to loop the animation until is stopped.
Screenshots
No response
Code Platform
- UWP
- WinAppSDK / WinUI 3
- Web Assembly (WASM)
- Android
- iOS
- MacOS
- Linux / GTK
Windows Build Number
- Windows 10 1809 (Build 17763)
- Windows 10 1903 (Build 18362)
- Windows 10 1909 (Build 18363)
- Windows 10 2004 (Build 19041)
- Windows 10 20H2 (Build 19042)
- Windows 10 21H1 (Build 19043)
- Windows 10 21H2 (Build 19044)
- Windows 10 22H2 (Build 19045)
- Windows 11 21H2 (Build 22000)
- Other (specify)
Other Windows Build number
26200.8117
App minimum and target SDK version
- Windows 10, version 1809 (Build 17763)
- Windows 10, version 1903 (Build 18362)
- Windows 10, version 1909 (Build 18363)
- Windows 10, version 2004 (Build 19041)
- Windows 10, version 2104 (Build 20348)
- Windows 11, version 22H2 (Build 22000)
- Other (specify)
Other SDK version
No response
Visual Studio Version
No response
Visual Studio Build Number
18.4.3
Device form factor
Desktop
Additional context
I tested with CommunityToolkit.WinUI.Behaviors version 8.3.260402-preview2 and stable version 8.2.251219.
Help us help you
No, I'm unable to contribute a solution.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcomponents::animationsA collection of implicit, composition and connected animation helpers and builders.A collection of implicit, composition and connected animation helpers and builders.regressionWhat was working is now brokeWhat was working is now broke
Activity