question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't use Binding when setting RenderTransform Property.

See original GitHub issue

Describe 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:closed
  • Created 4 months ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ImmortalLotuscommented, May 28, 2023

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Is it possible to bind not to a property of an element but ...
Binding cannot replace target object. You can use MultiValueConverter - to combine multiple tranforms into one TransformGroup:
Read more >
{Binding} not working in ContentTemplate in Custom Control
Hello,. Welcome to Microsoft Q&A! The issue is that when you are using binding in the TextBlock, the TextBlock can't find the datacontext...
Read more >
Customize Data Display with Data Binding and WPF
The following code illustrates how to use the BindingOperations class to bind the Text property of a textbox to a property on another...
Read more >
Mastering Windows Presentation Foundation
We then set the width and height of the path to the same values that were ... position to reflect the data bound...
Read more >
Pro WPF 4.5 in C#: Windows Presentation Foundation in .NET 4.5
It also takes the value of the handy RenderTransformOrigin property into account, allowing you to use relative coordinates for certain transforms (such as ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found