The C1DateTimePicker control represents a DateTime picker for selecting days and hours from drop down controls.

Namespace:  C1.WPF.C1Schedule
Assembly:  C1.WPF.C1Schedule (in C1.WPF.C1Schedule.dll)

Syntax

C#
[TemplatePartAttribute(Name = "PART_DatePicker", Type = typeof(ComboBox))]
[TemplatePartAttribute(Name = "PART_DropDownButton", Type = typeof(ToggleButton))]
[TemplatePartAttribute(Name = "PART_DropDownCalendar", Type = typeof(C1MonthCalendar))]
[TemplatePartAttribute(Name = "PART_TimePicker", Type = typeof(ComboBox))]
[TemplatePartAttribute(Name = "PART_EditableTextBox", Type = typeof(TextBox))]
[TemplatePartAttribute(Name = "PART_DayName", Type = typeof(TextBlock))]
[TemplatePartAttribute(Name = "PART_Popup", Type = typeof(Popup))]
public class C1DateTimePicker : C1CalendarBase
Visual Basic (Declaration)
<TemplatePartAttribute(Name := "PART_DatePicker", Type := GetType(ComboBox))> _
<TemplatePartAttribute(Name := "PART_DropDownButton", Type := GetType(ToggleButton))> _
<TemplatePartAttribute(Name := "PART_DropDownCalendar", Type := GetType(C1MonthCalendar))> _
<TemplatePartAttribute(Name := "PART_TimePicker", Type := GetType(ComboBox))> _
<TemplatePartAttribute(Name := "PART_EditableTextBox", Type := GetType(TextBox))> _
<TemplatePartAttribute(Name := "PART_DayName", Type := GetType(TextBlock))> _
<TemplatePartAttribute(Name := "PART_Popup", Type := GetType(Popup))> _
Public Class C1DateTimePicker _
	Inherits C1CalendarBase

Remarks

The default template contains two combo boxes:
  • PART_DatePicker - shows drop down calendar control for selecting date;
  • PART_TimePicker - shows ComboBox control filled in with all day hours array.
Control shows or hides these parts according to values of the ShowDatePicker and ShowTimePicker properties. Template parts used by default PART_DatePicker templates:
  • PART_DropDownCalendar - C1MonthCalendar control;
  • PART_EditableTextBox - editable TextBox control;
  • PART_DayName - TextBlock showing day name;
  • PART_Popup - Popup element;
  • PART_DropDownButton - ToggleButton.
The default template is defined in several places (default and theme specific):
  • default - theme/CommonCalendarResources.xaml
  • Aero.NormalColor - theme/Aero.NormalColor.xaml
  • Classic - theme/Classic.xaml
By default the C1DateTimePicker control uses current system theme resources.

Inheritance Hierarchy

System..::..Object
  System.Windows.Threading..::..DispatcherObject
    System.Windows..::..DependencyObject
      System.Windows.Media..::..Visual
        System.Windows..::..UIElement
          System.Windows..::..FrameworkElement
            System.Windows.Controls..::..Control
              C1.WPF.C1Schedule..::..C1CalendarBase
                C1.WPF.C1Schedule..::..C1DateTimePicker

See Also