Replies: 1 comment 2 replies
-
OpacityProperty is a doable property, while you set an integer. Change |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
I tried to implement this example from the documentation, but with the animation being declared in code behind instead of xaml. When I declare the animation in xaml like in the example it works as intended, but when it is declared in code behind nothing happens.
To Reproduce
So basically my UI has a Rectangle and a button, when the button is clicked it creates the animation and runs it:
Nothing happens when I click the button, the opacity doesn't change at all. Note that if I run this code instead:
it works as intended ("ResourceAnimation" being declared in xaml as done in the example).
I also tried animating different properties, using KeyTime instead of Cue, playing with Duration, PlaybackDirection, etc. Still nothing happens.
Expected behavior
No response
Avalonia version
11.1.0
OS
Windows, macOS
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions