a.lashkevich
Topic Author
Posts: 21
Joined: 23 Sep 2024, 08:50

animations bug

23 Sep 2025, 09:18

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?
 
User avatar
sfernandez
Site Admin
Posts: 3363
Joined: 22 Dec 2011, 19:20

Re: animations bug

23 Sep 2025, 09:58

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?
 
a.lashkevich
Topic Author
Posts: 21
Joined: 23 Sep 2024, 08:50

Re: animations bug

23 Sep 2025, 10:26

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 :)

Who is online

Users browsing this forum: No registered users and 3 guests