windowsforms-devexpress-dot-xtraeditors-dot-calendar-dot-customdrawdaynumbercelleventargs-36d218aa.md
Gets or sets the skin element that is used to paint the background of the currently processed cell.
Namespace : DevExpress.XtraEditors.Calendar
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
public SkinElementInfo BackgroundElementInfo { get; set; }
Public Property BackgroundElementInfo As SkinElementInfo
| Type | Description |
|---|---|
| DevExpress.Skins.SkinElementInfo |
A SkinElementInfo object that specifies the skin element that is used to paint the background of the currently processed cell.
|
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
See Also
CustomDrawDayNumberCellEventArgs Class