Skip to content

WASM: Double Animation Stops After 1 or 2 iterations #2498

Closed

Description

@MuzafarZargar

Current behavior

I have created double animation with repeat behavior set to forever.
Applied the animation to Render Transform
Attached Render Transform to textbox.
The target move as expected but stops after one or two iterations

Expected behavior

The animation should move for ever as according to repeat behavior (it does so in UWP)

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

Create a single page with following XAML and Code Behind

XAML

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition />
        </Grid.RowDefinitions>
        <TextBlock Text="Hello, world!" Margin="20" FontSize="30" 
                   x:Name="text"/>
        
        <Button VerticalAlignment="Center" HorizontalAlignment="Center"
                Content="Click ME" Grid.Row="1" Click="Button_Click">
        </Button>
    </Grid>

Code Behind

            var ts = new TranslateTransform();
            text.RenderTransform = ts;
            var da = new DoubleAnimation();
            da.To = 500;
            da.RepeatBehavior = RepeatBehavior.Forever;
            da.Duration = TimeSpan.FromSeconds(5);
            Storyboard.SetTarget(da, ts);
            Storyboard.SetTargetProperty(da, "X");
            var sb = new Storyboard();
            sb.Children.Add(da);
            sb.Begin();

Environment

Nuget Package:

Package Version(s):

Affected platform(s):

  • iOS
  • Android // working flawlessly
  • WebAssembly
  • WebAssembly renderers for Xamarin.Forms
  • macOS
  • Windows
  • Build tasks
  • Solution Templates

Visual Studio:

  • 2017 (version: )
  • 2019 (version: )
  • for Mac (version: )

Relevant plugins:

  • Resharper (version: )

Anything else we need to know?

Activity

  1. added
    kind/bug
    triage/untriaged
    on Jan 18, 2020
  2. changed the title [-]Double Animation Stops After 1 or 2 iterations[/-] [+]WASM: Double Animation Stops After 1 or 2 iterations[/+] on Jan 18, 2020
  3. removed
    triage/untriaged
    on Jan 21, 2020
  4. jeromelaban commented on Jan 21, 2020

    @jeromelaban
    Member

    Thanks for the report !

    @dr1rrb does it ring a bell ?

  5. dr1rrb commented on Jan 21, 2020

    @dr1rrb
    Member

    Unfortunately no 😕

  6. modified the milestone: 3.1 on Aug 28, 2020
  7. added
    project/animations 🎡
    on Sep 21, 2020
  8. added
    difficulty/tbd
    on Feb 15, 2021
  9. added
    difficulty/medium 🤔
    and removed
    difficulty/tbd
    on Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

difficulty/medium 🤔kind/bugproject/animations 🎡

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions