Can't use Binding when setting RenderTransform Property.
See original GitHub issueDescribe the bug
I have a roulette and so I need to apply the render transform with (360+random amount)deg, and when I finally got to making the roulette spin(I had to implement a control and it’s render part and it’s my first time with avalonia), I found out that this <Setter Property="RenderTransform" Value="{Binding Spin}"/>
simply does not work. Is this a bug? or is it an intended feature? It was so intuitive to try it out that it feels like a bug.
To Reproduce
<Setter Property="RenderTransform" Value="{Binding Spin}"/>
with any binding, will throw a weird exception: Error in binding to 'Roleta.Controls.CirculoControl'.'RenderTransform': 'Null value in expression '{empty}' at ''.'
and then will not spin(It’s what I’m trying to do)
Expected behavior
it spins.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Win11
Additional context although the code is horribly messy since I’m currently more interested in playing around with the framework instead of coding well, here is the repo for reference: https://github.com/ImmortalLotus/RoletaDaIndecisao
Issue Analytics
- State:
- Created 4 months ago
- Comments:13 (7 by maintainers)
Top GitHub Comments
https://github.com/AvaloniaUI/Avalonia/wiki/Breaking-Changes#avaloniathemesfluent-and-avaloniathemessimple-themes
which might be a common scenario for people trying to animate stuff on a trigger-like basis. Either way, it’s not that common. thx!