unoplatform / uno

Build Mobile, Desktop and WebAssembly apps with C# and XAML. Today. Open source and professionally supported.
https://platform.uno
Apache License 2.0
8.74k stars 706 forks source link

[WASM] `(Color)Animation.AutoReverse` not working #6027

Open stevozilik opened 3 years ago

stevozilik commented 3 years ago

Current behavior

AutoReverse is ignored

Expected behavior

AutoReverse plays the animation from End state back to Start state, as in UWP e.g.

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

Same code as your Animation Test https://github.com/unoplatform/uno/blob/master/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Media_Animation/ColorAnimation_Fill.xaml

but with:

<ColorAnimation AutoReverse="True"
        Duration="00:00:01"
    Storyboard.TargetName="TargetRectangle"
    Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
    From="Orange"
    To="Brown" />

Environment

Affected platform(s):

Youssef1313 commented 2 years ago

AutoReverse is not yet implemented:

https://github.com/unoplatform/uno/blob/a2347991a4b874da01830306677fd3e5270c1901/src/Uno.UI/Generated/3.0.0.0/Windows.UI.Xaml.Media.Animation/Timeline.cs#L28-L41