I've confirmed that the NumericUpDown.BackColor
property setter indeed does not call OnBackColorChanged
(in .NET 4.0 at least).
I assume this happens because the BackColor
property has been overriden in UpDownBase
to also set the BackColor
of the composited controls inside NumericUpDown
and maybe someone forgot to call the base implementation (I'd love to hear from some of the WinForms gurus here).
What you can do is create a FixedNumericUpDown
control that inherits from NumericUpDown
and overrides the BackColor
property as such:
public Color BackColor
{
override set
{
base.BackColor = value;
OnBackColorChanged(EventArgs.Empty);
}
}