Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DateNavigatorRequestCellAppearanceEventArgs.CellState Property

Gets the cell state.

Namespace: DevExpress.Xpf.Editors.DateNavigator

Assembly: DevExpress.Xpf.Core.v24.2.dll

NuGet Package: DevExpress.Wpf.Core

#Declaration

public DateNavigatorCalendarCellState CellState { get; }

#Property Value

Type Description
DateNavigatorCalendarCellState

Any of the flagged enumeration values.

Available values:

Name Description
None

The cell is in the normal state.

Focused

The cell is focused.

Holiday

The cell is a holiday.

Inactive

The cell is inactive.

Selected

The cell is focused.

Special

The cell is a special day.

Today

The cell is today.

Disabled

The cell is disabled.

#Remarks

private void DateNav_RequestCellAppearance(object sender, DevExpress.Xpf.Editors.DateNavigator.DateNavigatorRequestCellAppearanceEventArgs args) {
    DateTime day = new DateTime(2020, 9, 13);
      if (args.DateTime.Date == day && args.CellState.HasFlag(DevExpress.Xpf.Editors.DateNavigator.DateNavigatorCalendarCellState.Selected))
            {
                args.Appearance.Background = Brushes.Blue;
                args.Appearance.BorderBrush = Brushes.Red;
                args.CacheValue = true;
            }
}
See Also