During the using of NumericUpDown control in Framework 4.8 version I tent to delete the value inside NumericUpDown control. After leaving the value deleted and empty, the value stays the last input value that I think it should have been reset to 0. I try to refresh, update and validate the control and child controls of NumericUpDown which are UpDownEdit and UpDownButtons but the value doesn't appear in the UI. How do I make the UI to show the value when control loses focus.
I erased the value in control and expected it to be equal to 0 atleast when I lose focus.
UI refresh eventhandler on losing focus:
private void numericUpDown3_Leave(object sender, EventArgs e)
{
numericUpDown3.Refresh();
numericUpDown3.Update();
numericUpDown3.Validate();
numericUpDown3.Controls[0].Refresh();
numericUpDown3.Controls[0].Update();
numericUpDown3.Controls[1].Refresh();
numericUpDown3.Controls[1].Update();
}
numericUpDown3.Value = 0;do the trick. Isn't it?