I have implement the ValueChanged event, but I found it will be triggered only after change the focus from numericUpDown to other control or by clicking the up/down arrow.
Inputting the value in the control will not trigger ValueChanged event.
What I did now is adding an KeyDown event and judge if the input value is numeric (can not include SHIFT/CTRL/ALT key); but there is another case need to be involved: the user can paste value into the numericUpDown ctrl
What I need is :
- When I was typing numeric value (only numeric) in the numericUpDown ctrl, it will known the content has been changed;
- When pasted a numeric value into the ctrl, it also kowns the content changed
I answered your related other question about numeric updown control:
how to hold the invalid value for NumericUpDown after it loses focus?
You can use the same technique I described there to handle the TextChanged event of the embedded textbox.
Best regards…