-
I want to use a Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Answered by
IanRawley
Jul 24, 2024
Replies: 1 comment 5 replies
-
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I did start wondering if that was what you meant by "on code behind". I'd originally taken it to mean the property was on the view itself rather than viewmodel.
For doing it in code, take a look at this one:
https://docs.avaloniaui.net/docs/guides/data-binding/binding-from-code
Specifically any of the examples using XAML binding which refer to new Binding(). Binding has a ValueConverter property (inherited from BindingBase), taking IValueConverter? which while it's not used in the examples in that page should do what you need it to do.