Skip to content

Use the correct value for animations stopped during a visual tree detach#20995

Merged
MrJul merged 2 commits intoAvaloniaUI:masterfrom
MrJul:fix/animation-detach-fillmode
Mar 26, 2026
Merged

Use the correct value for animations stopped during a visual tree detach#20995
MrJul merged 2 commits intoAvaloniaUI:masterfrom
MrJul:fix/animation-detach-fillmode

Conversation

@MrJul
Copy link
Member

@MrJul MrJul commented Mar 26, 2026

What does the pull request do?

Since #20820, animations are stopped when they're detached from the visual tree. However, if FillMode is specified, the wrong value is used.

What is the current behavior?

When an animation is stopped because it's detached from the visual tree, FillMode uses the latest computed animated value.

What is the updated/expected behavior with this PR?

When an animation is stopped because it's detached from the visual tree, FillMode uses the value from the last key frame, as if the animation had completed.

Copy link
Member

@jmacato jmacato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🥳

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 12.0.999-cibuild0064089-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@MrJul MrJul added this pull request to the merge queue Mar 26, 2026
Merged via the queue into AvaloniaUI:master with commit 2dfd851 Mar 26, 2026
12 checks passed
@MrJul MrJul deleted the fix/animation-detach-fillmode branch March 26, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants