Skip to content

Storyboard AutoReverse=True does nothing on Uno #10629

@takla21

Description

@takla21

Current behavior

ezgif com-gif-maker(1)

Setting AutoReverse="True" does not reverse the animation.

<Storyboard RepeatBehavior="Forever"
		    AutoReverse="True">
	<DoubleAnimation Storyboard.TargetName="RectToAnimate"
				      Storyboard.TargetProperty="Opacity"
				      From="1"
				      To="0"
				      Duration="0:0:1" />
</Storyboard>

Expected behavior

The animation should be reverse what's set in the storyboard

autoreverse_expected

How to reproduce it (as minimally and precisely as possible)

Workaround

Specify explicitly the inverted animation.

<DoubleAnimationUsingKeyFrames Storyboard.TargetName="RectToAnimate"
						        Storyboard.TargetProperty="Opacity">
	<LinearDoubleKeyFrame KeyTime="0:0:0"
					       Value="1" />

	<LinearDoubleKeyFrame KeyTime="0:0:1"
					       Value="0" />

	<LinearDoubleKeyFrame KeyTime="0:0:2"
					       Value="1" />
</DoubleAnimationUsingKeyFrames>

Works on UWP/WinUI

Yes

Environment

Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia, Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia

NuGet package version(s)

4.7.0-dev.503

Affected platforms

Android, iOS

IDE

Visual Studio 2022

IDE version

17.3.5

Relevant plugins

No response

Anything else we need to know?

No response

Metadata

Metadata

Assignees

Labels

difficulty/medium 🤔Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUIkind/bugSomething isn't workingproject/animations 🎡Categorizes an issue or PR as relevant to animations

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions