The following example shows how to paint the background of numbers in a DateEdit control using the Editors.EditorButton skin element. The background is changed via the CustomDrawDayNumberCellEventArgs.BackgroundElementInfo property.
The result is shown below:
using DevExpress.Skins;
private void dateEdit1_DrawItem(object sender, DevExpress.XtraEditors.Calendar.CustomDrawDayNumberCellEventArgs e) {
dE = sender as DateEdit;
e.BackgroundElementInfo.Element =
EditorsSkins.GetSkin(dE.LookAndFeel.ActiveLookAndFeel)[EditorsSkins.SkinEditorButton];
}
Imports DevExpress.Skins
Private Sub DateEdit1_DrawItem(ByVal sender As Object, _
ByVal e As DevExpress.XtraEditors.Calendar.CustomDrawDayNumberCellEventArgs) _
Handles DateEdit1.DrawItem
dE = TryCast(sender, DateEdit)
e.BackgroundElementInfo.Element = EditorsSkins.GetSkin(dE.LookAndFeel.ActiveLookAndFeel)(EditorsSkins.SkinEditorButton)
End Sub