Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SchedulerControl.CustomizeDateNavigationBarCaption Event

Handle this event to specify the caption of the Date Navigation Bar control.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v24.2.dll

NuGet Package: DevExpress.Win.Scheduler

#Declaration

public event EventHandler<CustomizeDateNavigationBarCaptionEventArgs> CustomizeDateNavigationBarCaption

#Event Data

The CustomizeDateNavigationBarCaption event's data class is CustomizeDateNavigationBarCaptionEventArgs. The following properties provide information specific to this event:

Property Description
Caption Gets or sets a text displayed as a caption in the SchedulerDateNavigationBar control.
Interval Gets the visible date interval of the SchedulerControl which should be indicated in the Date Navigation Bar control.

#Example

CustomizeDateNavigationBarCaptionEvent

The image illustrates how the text in the Date Navigation Bar control is changed by handling the SchedulerControl.CustomizeDateNavigationBarCaption event.

    scheduler.CustomizeDateNavigationBarCaption += scheduler_CustomizeDateNavigationBarCaption;
    scheduler.ActiveView.LayoutChanged();
public static void scheduler_CustomizeDateNavigationBarCaption(object sender, CustomizeDateNavigationBarCaptionEventArgs e) {
    e.Caption = String.Format("Displaying dates from {0:D} to {1:D}", e.Interval.Start.Date, e.Interval.End.Date);
}
See Also