How to make TextBox numeric and set min and max value to it
I've tried something like that but it gives problems
10 Replies
why does it need to be a textbox?
does NumericUpDown not work for your purpose?
hmm everywhere i see as the best way is to use textbox idk why
i didn't know about NumericUpDown i am gonna check this now
are you using WPF?
ye
ah
it doesn't have that control built in
winforms does
ah okay thats why i see textbox as only option xd
https://learn.microsoft.com/dotnet/desktop/wpf/data/how-to-implement-binding-validation
perhaps check this out
mh, this is about bindings...
okay it looks good
maybe something similar works still though
try doing as little as possible in code in wpf
many things will be necessary, but you can do much more than you think in just xaml
Okay thank you ❤️