Back to Devexpress

SchedulerControl.CustomizeDateNavigationBarCaption Event

windowsforms-devexpress-dot-xtrascheduler-dot-schedulercontrol-922f3961.md

latest3.4 KB
Original Source

SchedulerControl.CustomizeDateNavigationBarCaption Event

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

Namespace : DevExpress.XtraScheduler

Assembly : DevExpress.XtraScheduler.v25.2.dll

NuGet Package : DevExpress.Win.Scheduler

Declaration

csharp
public event EventHandler<CustomizeDateNavigationBarCaptionEventArgs> CustomizeDateNavigationBarCaption
vb
Public Event CustomizeDateNavigationBarCaption As EventHandler(Of CustomizeDateNavigationBarCaptionEventArgs)

Event Data

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

PropertyDescription
CaptionGets or sets a text displayed as a caption in the SchedulerDateNavigationBar control.
IntervalGets the visible date interval of the SchedulerControl which should be indicated in the Date Navigation Bar control.

Example

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

csharp
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);
}
vb
AddHandler scheduler.CustomizeDateNavigationBarCaption, AddressOf scheduler_CustomizeDateNavigationBarCaption
    scheduler.ActiveView.LayoutChanged()
Public Shared Sub scheduler_CustomizeDateNavigationBarCaption(ByVal sender As Object, ByVal e As CustomizeDateNavigationBarCaptionEventArgs)
    e.Caption = String.Format("Displaying dates from {0:D} to {1:D}", e.Interval.Start.Date, e.Interval.End.Date)
End Sub

See Also

SchedulerControl Class

SchedulerControl Members

DevExpress.XtraScheduler Namespace