private NumericUpDown CreateControl() { var control = new NumericUpDown { Template = CreateTemplate() }; control.ApplyTemplate(); return(control); }