Back to Devexpress

DateNavigator.Appearance Property

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

latest4.1 KB
Original Source

DateNavigator.Appearance Property

Gets or sets the calendar’s appearance. This is a dependency property.

Namespace : DevExpress.Xpf.Editors.DateNavigator

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public DateNavigatorCellAppearance Appearance { get; set; }
vb
Public Property Appearance As DateNavigatorCellAppearance

Property Value

TypeDescription
DateNavigatorCellAppearance

An object that contains cell appearance settings.

|

Remarks

The DateNavigator searches for a cell’s appearance settings in the cell’s states. The search order depends of an application theme. The search 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 following themes are supported:

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

The code sample below demonstrates how to customize DateNavigator cell 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>

Runtime Appearance Customization

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

See Also

DateNavigator Class

DateNavigator Members

DevExpress.Xpf.Editors.DateNavigator Namespace