Repository navigation
Closed
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
Description
Repro: AnimationBugDemonstrate-main.zip
Discussed in #7810
Originally posted by limeniye January 12, 2022
Test repository
I have simple animation
UWP.mp4
But in the Android platfrom I have weird result
Android.mp4
Button click
private void StartAnimationClicked(object sender, RoutedEventArgs e)
{
justStoryboard.Pause();
justStoryboard = new Storyboard();
SetTestStroyboard(TimeSpan.FromMilliseconds(2_000));
justStoryboard.Begin();
}Animation
private void SetTestStroyboard(TimeSpan timeSpan)
{
var renderTransform = animationBorder.RenderTransform as TranslateTransform;
var elementVisualRelative = staticBorder.TransformToVisual(this);
Point staticBorderPostition = elementVisualRelative.TransformPoint(new Point(0, 0));
#region xAnimation
DoubleAnimationUsingKeyFrames xAnimation = new DoubleAnimationUsingKeyFrames() { EnableDependentAnimation = true };
xAnimation.KeyFrames.Add(new LinearDoubleKeyFrame() { Value = staticBorderPostition.X, KeyTime = KeyTime.FromTimeSpan(timeSpan) });
Storyboard.SetTarget(xAnimation, renderTransform);
Storyboard.SetTargetProperty(xAnimation, "X");
#endregion
#region yAnimation
DoubleAnimationUsingKeyFrames yAnimation = new DoubleAnimationUsingKeyFrames() { EnableDependentAnimation = true };
yAnimation.KeyFrames.Add(new LinearDoubleKeyFrame() { Value = staticBorderPostition.Y, KeyTime = KeyTime.FromTimeSpan(timeSpan) });
Storyboard.SetTarget(yAnimation, renderTransform);
Storyboard.SetTargetProperty(yAnimation, "Y");
#endregion
justStoryboard.Children.Add(xAnimation);
justStoryboard.Children.Add(yAnimation);
} <Grid>
<Border x:Name="staticBorder" Background="Red" Height="80" Width="301" HorizontalAlignment="Left" VerticalAlignment="Top">
<Border.RenderTransform>
<TranslateTransform X="50" Y="50"/>
</Border.RenderTransform>
</Border>
<Border x:Name="animationBorder" Background="Orange" Height="80" Width="301" HorizontalAlignment="Left" VerticalAlignment="Top">
<Border.RenderTransform>
<TranslateTransform X="150" Y="300"/>
</Border.RenderTransform>
</Border>
<Button Content="Start" Click="StartAnimationClicked" Background="Red" Height="50"
HorizontalAlignment="Stretch" VerticalAlignment="Bottom"/>
</Grid>- UWP
- WASM
- WPF Skia
- Mobile
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
Activity
jeromelaban commentedon Jan 13, 2022
/cc @dr1rrb
dr1rrb commentedon Jan 13, 2022
The issue is most probably that in your sample your animating 2 properties of the same
Transformat once, which is unfortunately not supported yet https://github.com/unoplatform/uno/blob/master/doc/articles/features/working-with-animations.md#general-guidelinesdr1rrb commentedon Jan 13, 2022
A possible workaround could be to use an
AnimationGroupwith 2TranslateTransformAnd then in your animation you target directly the
xTransformand theyTransformI didn't tested it yet though ...
limeniye commentedon Jan 13, 2022
@dr1rrb I tried to use your recommendations but they didn't give a result.
Result.after.dr1rrb.recommendations.mp4
I made these changes to the test repository.
[-][Android] RenderTransform Animation doesn't work well[/-][+][Android] `RenderTransform` animation doesn't work well[/+]limeniye commentedon Nov 16, 2023
Is steel doesn't works well? Can we close this issue?
MartinZikmund commentedon Jul 18, 2025
Only relevant on native, but works correctly on Skia Android
github-actions commentedon May 4, 2026
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or feature requests.