SchedulerControl.CustomWorkTime Event

Allows you to specify several custom work time intervals per day, which can be set differently for distinct days and resources.

Namespace: DevExpress.Xpf.Scheduling

Assembly: DevExpress.Xpf.Scheduling.v21.2.dll


public event CustomWorkTimeEventHandler CustomWorkTime

Event Data

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

Property Description
Interval Gets the time interval for which a work time setting is obtained.
Resource Gets the resource for which a work time setting is obtained.
WorkTime Gets or sets a single work time interval.
WorkTimes Gets or sets a collection of work time intervals.


Handle the CustomWorkTime event and use the CustomWorkTimeEventArgs.Interval and CustomWorkTimeEventArgs.Resource properties to determine the range for which time intervals are specified. Set a single work time interval with the CustomWorkTimeEventArgs.WorkTime property. Use the CustomWorkTimeEventArgs.WorkTimes property to specify several work time intervals.


This example demonstrates how to use the SchedulerControl.CustomWorkTime event to specify several work time intervals per day, which vary for different days and resources.


View Example

<dxsch:SchedulerControl CustomWorkTime="SchedulerControl_CustomWorkTime"
    ResourceBrushSchemas="{StaticResource MyResourceSchemas}">
        <dxsch:ResourceItem Caption="One" Id="1" />
        <dxsch:ResourceItem Caption="Two" Id="2" />
        <dxsch:ResourceItem Caption="Three" Id="3" />
        <dxsch:ResourceItem Caption="Four" Id="4" />
    <dxsch:WeekView x:Name="weekView1"
        DateHeaderContentTemplate="{StaticResource DateHeaderControl.ContentTemplate}"/>
    <dxsch:TimelineView x:Name="timelineView1"/>
See Also