uno icon indicating copy to clipboard operation
uno copied to clipboard

Storyboard `AutoReverse=True` does nothing on Uno

Open takla21 opened this issue 2 years ago • 1 comments

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

takla21 avatar Dec 02 '22 15:12 takla21

It's not yet implemented. It should produce a warning indicating that.

Related issues:

https://github.com/unoplatform/uno/issues/6027 https://github.com/unoplatform/uno/issues/5382

Youssef1313 avatar Dec 02 '22 17:12 Youssef1313