Page 1 of 1

animations bug

Posted: 23 Sep 2025, 09:18
by a.lashkevich
hello noesis team!

I want to create animation sequence with animation same property.
I've created such code (for example):
<Button Content="Button" Width="200" Height="100">
      <Button.Triggers>
           <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                <BeginStoryboard>
                       <Storyboard RepeatBehavior="Forever">
                             <DoubleAnimation Storyboard.TargetProperty="Width" From="200" To="300" BeginTime="0:0:0" Duration="0:0:1" />
                             <DoubleAnimation Storyboard.TargetProperty="Width" From="300" To="200" BeginTime="0:0:1" Duration="0:0:1" />
                      </Storyboard>
               </BeginStoryboard>
           </EventTrigger>
      </Button.Triggers>
    </Button>
And I see only result of 2nd animation, but in microsoft blend for the same example I see 1st and 2nd animation.
Could you please explain this?

Re: animations bug

Posted: 23 Sep 2025, 09:58
by sfernandez
This is a known issue: #3647

The workaround is to use KeyFrame animations:
<Storyboard RepeatBehavior="Forever">
  <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Width">
    <LinearDoubleKeyFrame KeyTime="0:0:0" Value="200"/>
    <LinearDoubleKeyFrame KeyTime="0:0:1" Value="300"/>
    <LinearDoubleKeyFrame KeyTime="0:0:2" Value="200"/>
  </DoubleAnimationUsingKeyFrames>
</Storyboard>
Could that work for you?

Re: animations bug

Posted: 23 Sep 2025, 10:26
by a.lashkevich
yes, it works, thanks!!!

please find time to fix this bug, because it is not good when you have 3 same bug and they are opened many years :)