Back to Devexpress

DateNavigatorRequestCellAppearanceEventArgs.CellState Property

wpf-devexpress-dot-xpf-dot-editors-dot-datenavigator-dot-datenavigatorrequestcellappearanceeventargs-f6a9f2d6.md

latest2.3 KB
Original Source

DateNavigatorRequestCellAppearanceEventArgs.CellState Property

Gets the cell state.

Namespace : DevExpress.Xpf.Editors.DateNavigator

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public DateNavigatorCalendarCellState CellState { get; }
vb
Public ReadOnly Property CellState As DateNavigatorCalendarCellState

Property Value

TypeDescription
DateNavigatorCalendarCellState

Any of the flagged enumeration values.

|

Available values:

NameDescription
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

csharp
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

DateNavigatorRequestCellAppearanceEventArgs Class

DateNavigatorRequestCellAppearanceEventArgs Members

DevExpress.Xpf.Editors.DateNavigator Namespace