MVVM TOOLKIT SetProtperty
Hello, i'm trying to had a decimal number in my textbox but i can't add a
.
or ,
to write my decimal number.
here is the declaration of my property that i bind to my textbox.
Do i need to link my textbox to a string and then i parse this string to affect the value to RollPosition ?3 Replies
Have you considered using a converter directly on your binding?
You can keep the property type as double
And have the textbox receive a formatted string
yeah i've already thougth about this possibility but it looks a bit weird to me to do a converter in order to take input for
double
Well one way or another you'll have to have some conversion logic to take a string and format it into a double. Even if you end up going with a custom control
So I say that a converter is fine