unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
8.78k stars 706 forks source link

Cannot animate multiple properties of the same object simulatneously #12530

Open dr1rrb opened 1 year ago

dr1rrb commented 1 year ago

Current behavior

If you animate X and Y properties on the same TranslateTransform you might have some weird behaviors on Android and iOS (independent animations).

https://github.com/unoplatform/uno/blob/master/doc/articles/features/working-with-animations.md#general-guidelines

Expected behavior

You can animate all properties of an object!

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

No response

Workaround

Create a UI sub-layer for each property you can to animate, for instance for X and Y of TranslateTransform you do something like :

<Border>
    <Border.RenderTransform>
        <TranslateTransform x:Name="xTransform" X="0" />
    </Border.RenderTransform>
    <Border>
        <Border.RenderTransform>
            <TranslateTransform x:Name="yTransform" Y="0" />
        </Border.RenderTransform>
    </Border>
</Border>

Works on UWP/WinUI

None

Environment

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

NuGet package version(s)

4.9

Affected platforms

Android, iOS

IDE

No response

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

No response

dr1rrb commented 1 year ago

This issue is a blocker for the workaround suggested here https://github.com/unoplatform/uno/issues/12301

This is also probably the root cause for https://github.com/unoplatform/uno/issues/7812