Avalonia icon indicating copy to clipboard operation
Avalonia copied to clipboard

ScaleTransform in Animation not working on v11.0.0-preview1

Open DrWenz opened this issue 1 year ago • 1 comments

Describe the bug ScaleTransform in Animation not working on v11.0.0-preview1

To Reproduce Steps to reproduce the behavior:

  1. Create new project
  2. Change AvaloniaVersion to v11.0.0-preview1
  3. Add following to MainWindow.cs
<Window.Styles>
        <Style Selector="Arc.infinity">
            <Setter Property="Width"
                    Value="450" />
            <Setter Property="Height"
                    Value="450" />
            <Setter Property="Stroke"
                    Value="Gray" />
            <Setter Property="StrokeThickness"
                    Value="2" />
            <Setter Property="Opacity"
                    Value="1" />
            <Setter Property="SweepAngle"
                    Value="360" />
            <Setter Property="Transitions">
                <Setter.Value>
                    <Transitions>
                        <TransformOperationsTransition Property="RenderTransform"
                                                       Duration="0:0:.25"
                                                       Easing="CubicEaseInOut" />
                    </Transitions>
                </Setter.Value>
            </Setter>
        </Style>
        <Style Selector="Arc.infAnim-1">
            <Style.Animations>
                <Animation Duration="0:0:4"
                           IterationCount="INFINITE">
                    <KeyFrame Cue="0%">
                        <Setter Property="Opacity"
                                Value=".2" />
                        <Setter Property="ScaleTransform.ScaleX"
                                Value="1" />
                        <Setter Property="ScaleTransform.ScaleY"
                                Value="1" />
                    </KeyFrame>
                    <KeyFrame Cue="100%">
                        <Setter Property="Opacity"
                                Value="0.0" />
                        <Setter Property="ScaleTransform.ScaleX"
                                Value="0.8" />
                        <Setter Property="ScaleTransform.ScaleY"
                                Value="0.8" />
                    </KeyFrame>
                </Animation>
            </Style.Animations>
        </Style>
    </Window.Styles>
    <Arc Classes="infinity infAnim-1" />

Expected behavior Animated circle that scales from 1.0 to 0.8 and changes opacity from 1 to 0 in 4 seconds on a infinity loop.

Screenshots Version 0.10.18:

https://user-images.githubusercontent.com/40403356/186092448-39246e80-7431-4f04-99be-49a96812e13d.mov

Version v11.0.0-preview1:

https://user-images.githubusercontent.com/40403356/186092649-a5efdf14-ab07-46e7-8eb2-0f207ff21df7.mov

Desktop (please complete the following information):

  • OS: macOS Monterey 12.5.1 (21G83)
  • Version: v11.0.0-preview1

DrWenz avatar Aug 23 '22 07:08 DrWenz

Might be related to https://github.com/AvaloniaUI/Avalonia/issues/8791

wieslawsoltes avatar Aug 23 '22 07:08 wieslawsoltes