[updated 09th Febuary 2008 – Bug fix for DateTimePicker]
After loads of requests for a DateTimePicker in AvalonControlLibrary I finally had sometime to build a DateTimePicker. DateTimePicker is nothing really special it is a DatePicker and a TimePicker combined in one control.
DateTimePicker exposes an important property called DateTimeSelected. DateTimeSelected is a dependency property so that you can use it in data binding. DateTimePicker also exposes an event DateTimeSelectedChanged that is raised whenever the date/time is changed.
There are some other useful properties that you can set to layout this control
MinuteHand – This property takes a Brush and it is used to color the minute hand
HourHand – This property takes a Brush and it is used to color the hour hand
ClockBackground – This property takes a Brush and it is used as Background color for the clock
CalanderHeaderBackground – This property takes a Brush and it is used as Background for the header of the calander
CalanderHeaderForeground – This property takes a Brush and it is used as Foreground for the header text of the calander
This control also supports control templates. You MUST supply a DatePicker named PART_DatePicker and a TimePicker named as PART_TimePicker in order to create a ControlTemplate for this control.
This control will ship in v2 of AvalonControlLibrary. If you have any suggestions or find any bugs please let me know so that I can update it before I release AvalonControlLibrary v2.
Please note that a new version is available here