diff --git a/samples/RenderTest/Pages/AnimationsPage.xaml b/samples/RenderTest/Pages/AnimationsPage.xaml index 5cd4e6e431..76e4ba0051 100644 --- a/samples/RenderTest/Pages/AnimationsPage.xaml +++ b/samples/RenderTest/Pages/AnimationsPage.xaml @@ -1,72 +1,94 @@ - - - - - - + + + + - + - - - - - + + + + + + + + + + + Hover to activate Transform Keyframe Animations. + + - + - + + + + + + - + + + \ No newline at end of file diff --git a/src/Avalonia.Animation/Keyframes/DoubleKeyFrames.cs b/src/Avalonia.Animation/Keyframes/DoubleKeyFrames.cs index 00558430e0..107b736b8b 100644 --- a/src/Avalonia.Animation/Keyframes/DoubleKeyFrames.cs +++ b/src/Avalonia.Animation/Keyframes/DoubleKeyFrames.cs @@ -40,10 +40,9 @@ namespace Avalonia.Animation.Keyframes bool isWithinRange_End = DoubleUtils.AboutEqual(x, 1.0) || x < 1.0; if (isWithinRange_Start && isWithinRange_End) - { - + { firstCue = sortedkeyValues.Where(j => j.Key <= x).Last(); - lastCue = sortedkeyValues.Where(j=> j.Key >= firstCue.Key).First(); + lastCue = sortedkeyValues.Where(j => j.Key >= x).First(); } else if (!isWithinRange_Start) {