Open
Description
Description
After animating the location of the element so that it moves up the screen and then starting a repeating animation to rotate the element, the vertical positioning of the element glitches every few seconds so that it jumps up the screen before returning to its correct position.
Steps to Reproduce
- Create a File > New .NET MAUI App
- Replace MainPage.xaml content with the following.
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ManuAnimationsBug.MainPage"
Loaded="ContentPage_Loaded">
<VerticalStackLayout VerticalOptions="CenterAndExpand">
<Image
x:Name="BotLogo"
Source="dotnet_bot.png"
SemanticProperties.Description="Cute dot net bot waving hi to you!"
HeightRequest="200"
WidthRequest="200"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand" />
</VerticalStackLayout>
</ContentPage>
- Replace the MainPage.xaml.cs with the following...
namespace ManuAnimationsBug;
public partial class MainPage : ContentPage
{
private readonly Task _delay;
private Animation _logoRotation;
public MainPage()
{
InitializeComponent();
_delay = Task.Delay(2_000);
}
private async void ContentPage_Loaded(object sender, EventArgs e)
{
await _delay;
await AnimateSplashLogoAsync();
}
private async Task AnimateSplashLogoAsync()
{
await BotLogo.TranslateTo(0, -200, length: 1_000);
RotateLogo();
}
private void RotateLogo()
{
_logoRotation = new Animation(v => BotLogo.RotationY = v, 0, 360);
_logoRotation.Commit(this, "ChildAnimations", 16, 2000, null, repeat: () => true);
}
}
- Run the app
Expected outcome: logo moves to the top of the screen and animates
Actual outcome: logo moves to the top of the screen then glitches location as it animates
Link to public reproduction project repository
https://dev.azure.com/JohnHunter0895/_git/MauiAnimationBug
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
windows10.0.19041.0
Did you find any workaround?
No workaround
Relevant log output
No response