Back to Devexpress

DateNavigatorCellAppearance Class

wpf-devexpress-dot-xpf-dot-editors-dot-datenavigator-af6ef190.md

latest4.8 KB
Original Source

DateNavigatorCellAppearance Class

Contains a DateNavigator‘s cell states.

Namespace : DevExpress.Xpf.Editors.DateNavigator

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public class DateNavigatorCellAppearance :
    Freezable
vb
Public Class DateNavigatorCellAppearance
    Inherits Freezable

The following members return DateNavigatorCellAppearance objects:

Remarks

Search Order

The DateNavigator searches for cell appearance settings in the cell states. The search order depends on the application theme, and is conducted in the following order:

  1. DisabledState
  2. InactiveState
  3. HolidayState
  4. SpecialDateState
  5. FocusedState
  6. MouseOverState
  7. SelectedState
  8. TodayState
  9. NormalState.

Tip

The DateNavigator searches for a cell’s appearance settings in the cell’s states only when one of the following themes are applied to an application:

Theme FamilyThemes
Windows 11Dark, Light
Windows 10Dark, Light
Office 2019Black, Colorful, Dark Gray, White, HighContrast
Visual Studio 2019Blue, Dark, Light
Office 2016 SEBlack, Colorful, Dark Gray, White
Visual Studio 2017Blue, Dark, Light

Note

Once the DateNavigator has found the cell’s appearance property, the scanning is stopped.

RequestCellAppearance Event

Use a cell’s RequestCellAppearance event to get or set cell appearance values at runtime.

Code Sample

The code sample below demonstrates how to customize DateNavigator cells’ appearance.

xaml
<Window ...
  xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors">
  <dxe:DateNavigator>
    <dxe:DateNavigator.Appearance>
      <dxe:DateNavigatorCellAppearance>
        <dxe:DateNavigatorCellAppearance.NormalState>
          <dxe:DateNavigatorStateAppearance Background="Red" CornerRadius="5"/>
        </dxe:DateNavigatorCellAppearance.NormalState>
        <dxe:DateNavigatorCellAppearance.MouseOverState>
          <dxe:DateNavigatorStateAppearance Background="Green"/>
        </dxe:DateNavigatorCellAppearance.MouseOverState>
      </dxe:DateNavigatorCellAppearance>
    </dxe:DateNavigator.Appearance>
  </dxe:DateNavigator>
</Window>

Inheritance

Object DispatcherObject DependencyObject Freezable DateNavigatorCellAppearance

See Also

DateNavigatorCellAppearance Members

DevExpress.Xpf.Editors.DateNavigator Namespace