Animations start with a one-frame delay in Avalonia 11
See original GitHub issueDescribe the bug As of Avalonia 11 preview 1, controls are rendered for a single frame before animations begin. This is very noticeable if the animation is fading the control in by changing its opacity.
This does not happen in Avalonia 0.10.18
To Reproduce Paste the following XAML into a new window, run it, and click the button:
<Grid RowDefinitions="Auto,*">
<ToggleButton Name="Toggle">Begin animation</ToggleButton>
<Border Grid.Row="1" Background="Red" IsVisible="{Binding IsChecked, ElementName=Toggle}">
<Border.Styles>
<Style Selector="Border[IsVisible=true]">
<Style.Animations>
<Animation Duration="0:0:1">
<KeyFrame Cue="0%">
<Setter Property="Opacity" Value="0.0"/>
</KeyFrame>
<KeyFrame Cue="90%">
<Setter Property="Opacity" Value="0.0"/>
</KeyFrame>
<KeyFrame Cue="100%">
<Setter Property="Opacity" Value="1.0"/>
</KeyFrame>
</Animation>
</Style.Animations>
</Style>
</Border.Styles>
</Border>
</Grid>
You will see the red border flicker on-screen as soon as the button is clicked.
Expected behavior When the control’s becomes visible its opacity is immediately set to zero, and no red border is drawn until the animation starts to raise the opacity value (after 900ms).
Desktop (please complete the following information):
- OS: Windows
- Version: 11 preview 1
Issue Analytics
- State:
- Created a year ago
- Comments:18 (18 by maintainers)
Top Results From Across the Web
Animations
Animations. There are two types of animations in Avalonia UI: Keyframe Animation - can change one or more property values using a timeline....
Read more >An internet points out that Hackernews' favorite text editor ...
To be fair, the conversation had already shifted to X11/Wayland. GNOME does have a history of starting over from scratch every few years;...
Read more >018. Avalonia UI - Animating Over Time (To 100% Height)
Support me in my journey to giving back to the industry all my knowledge and helping the world with what I do. Spreading...
Read more >Untitled
Immigration between 1840 and 1860, Relay starter kereta, Westwood 1 radio stream, ... Kurs oficerski bor, Supa strikas starting 11, Clara zuquete!
Read more >Hey I'm new to programming and I just watched a video ...
Right now if you jump, the update to the velocity is delayed by one frame. Because you update the velocity with controller.Move and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is already a bug report containing a reproducible sample. We’re going to open a new issue via the paid support channel later today.
Closing this in favor of https://github.com/AvaloniaUI/avalonia-docs/issues/134