Search code examples
winformspropertiesformatcontrolsdatetimepicker

Set default Format property value for every DateTimePicker control I add from Toolbox in VS 2010


I am building a database application against a database with several date fields. I am using DateTimePickers bound to those fields in my Windows Forms.

By default, whenever I add a DateTimePicker control to my form via Drag n Drop in Visual Studio 2010 the Format property is set to Long. I would like the DateTimePicker to always come in as Short format.

Is it possible to edit the provided template controls available in the VS 2010 Toolbox without having to create a custom control?


Solution

  • Perhaps you could create a UserControl that is derived from the DateTimePicker and then set the default value for Format that way. :)