Skip to content

NumericUpDown binding Value to converter #16448

Answered by IanRawley
Arcnor asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 5 replies

Comment options

@Arcnor
Comment options

@IanRawley
Comment options

Answer selected by Arcnor
@Arcnor
Comment options

@Arcnor
Comment options

@IanRawley
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants