tags:

views:

211

answers:

1

I downloaded the Avalon Controls Library that includes a DatePicker and a MaskedTextBox. Our company would like to force the date format of the DatePicker to something else than Short or Long.

Is there a way to do this?

Thanks.

+1  A: 

Yes, because this is WPF you can replace the template on either control. Just start with the ControlTemplates found in the Themes directory and modify them as desired.

It looks like the DatePicker template has a TextBox bound to CurrentlySelectedDateString, which is computed in code. Just change this to bind to the CurrentlySelectedDate and use a converter.

The TimePicker lays out the time as TextBoxes in a sequence - just change the sequence of the textboxes to suit.

Ray Burns