private int DetermineErrorIconPadding(Control control) { if (control is TextBox) return -18; if (control is NumericUpDown) return -32; return -18; }