DateNavigator Class

A date navigator control.

Namespace: DevExpress.Xpf.Editors.DateNavigator

Assembly: DevExpress.Xpf.Core.v20.1.dll

Declaration

public class DateNavigator :
    Control,
    IDateNavigatorContentContainer,
    IServiceProvider,
    ILogicalOwner,
    IInputElement,
    IDateEditCalendarBase
Public Class DateNavigator
    Inherits Control
    Implements IDateNavigatorContentContainer,
               IServiceProvider,
               ILogicalOwner,
               IInputElement,
               IDateEditCalendarBase

Returned By

The DateNavigator.GetNavigator(DependencyObject) method returns an instance of DateNavigator.

Remarks

DateNavigator

Create a DateNavigator Control

Drag the DevExpress DateNavigator from Visual Studio's Toolbox onto the form. As a result, the MainWindow.xaml file should look as follows:

<Window ... 
  xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors">
  <dxe:DateNavigator HighlightHolidays="False" IsMultiSelect="False" 
                     FirstDayOfWeek="Sunday" CalendarView="Year" /> 
</Window>

Date Types

The DateNavigator contains following date types:

Type Property Description
Disabled Date DisabledDates Gets or sets a collection of dates that users cannot select.
Focused Date FocusedDate Gets or sets the date in a calendar that has focus.
Holiday Holidays Gets or sets a collection of custom holidays.
Selected Date SelectedDates Gets or sets a collection of dates that are selected within the DateNavigator control.
Special Date SpecialDates Gets or sets a collection of special dates.
Workday Workdays Gets or sets a collection of workdays in a week.
TIP

Use the Appearance property to specify a cell's appearance for each state.

Calendar Views

Use the CalendarView and the SelectionView properties to specify the calendar view in which a user can select a value.

Selection

Set the IsMultiSelect property to true to allow users to select multiple dates.

Min\Max Values

Use the MinValue and MaxValue properties to specify minimum and maximum values which a user can select.

Appearance

Use the Appearance property to specify a cell's appearance.

First Day of a Week

Use the FirstDayOfWeek property to specify the first day of a week.

Today Button

Set the ShowTodayButton property to false to hide the Today button.

Highlight Dates

Use the HighlightHolidays and HighlightSpecialDates properties to specify whether the DateNavigator highlights holidays and special dates.

See Also