DateNavigator Class

A date navigator control.

Namespace: DevExpress.Xpf.Editors.DateNavigator

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

Declaration

public class DateNavigator :
    Control,
    IDateNavigatorContentContainer,
    IServiceProvider,
    ILogicalOwner,
    IInputElement,
    IDateEditCalendarBase

The following members accept/return DateNavigator objects:

Remarks

DateNavigator

Create a DateNavigator Control

Drag the DevExpress DateNavigator control from the Visual Studio Toolbox onto the form. As a result, the MainWindow.xaml file should appear 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 control contains the 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

To specify a cell’s appearance for each state, use the Appearance property.

Appearance

The DateNavigator control contains the following appearance properties:

Property Description
CalendarView Specifies the calendar calendar display mode.
SelectionView Specifies the calendar view in which a user can select a value.
IsMultiSelect Allows users to select multiple dates.
MinValue Specifies the minimum value that a user can select.
MaxValue Specifies the maximum value that a user can select.
Appearance Specifies a cell’s appearance.
FirstDayOfWeek Specifies the first day of a week.
ShowTodayButton Hides the Today button.
HighlightHolidays Specifies whether the DateNavigator highlights holidays.
HighlightSpecialDates Specifies whether the DateNavigator highlights special dates.

You can use the RefreshCellAppearances() method to raise the RequestCellAppearance event for each cell and clear the cached appearance values.

Scroll To Date

To display a specific date in the current DateNavigator view, use the ScrollToDate(DateTime) method.

See Also