Themes and Styles in Windows Forms DateTimePickerAdv(Classic)

Themes

We can apply themes for the DateTimePickerAdv and also the child controls using the below properties.

this.dateTimePickerAdv1.ThemesEnabled = true;
this.dateTimePickerAdv1.ThemedChildControls = true;
Me.dateTimePickerAdv1.ThemesEnabled = True
Me.dateTimePickerAdv1.ThemedChildControls = True
' Setting backcolor for the control when it is ReadOnly
Me.dateTimePickerAdv1.ReadOnly = True
Me.dateTimePickerAdv1.IgnoreThemeBackground = True

Themes

Themes

Styles

Visual Styles for the DateTimePickerAdv and its child controls can be applied using the Style property.

// Sample for setting Office2007 style for the control
this.dateTimePickerAdv1.Style = Syncfusion.Windows.Forms.VisualStyle.Office2007;
' Sample for setting Office2007 style for the control
Me.dateTimePickerAdv1.Style = Syncfusion.Windows.Forms.VisualStyle.Office2007

Office2007 styles

//Sets the Color scheme as Blue when the style is Office2007
this.dateTimePickerAdv1.Office2007Theme = Syncfusion.Windows.Forms.Office2007Theme.Blue;
'Sets the Color scheme as Blue when the style is Office2007
Me.dateTimePickerAdv1.Office2007Theme = Syncfusion.Windows.Forms.Office2007Theme.Blue

Office2007 styles

Custom Colors

We can also apply custom colors to the DateTimePickerAdv control by setting Office2007Theme to “Managed” and specifying the custom color through the ApplyManagedColors method as follows.

this.dateTimePickerAdv1.Office2007Theme = Syncfusion.Windows.Forms.Office2007Theme.Managed;
Office2007Colors.ApplyManagedColors(this, Color.Orange);
Me.dateTimePickerAdv1.Office2007Theme = Syncfusion.Windows.Forms.Office2007Theme.Managed;
Office2007Colors.ApplyManagedColors(Me, Color.Orange)

Custom Colors