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.v20.1.dll

Declaration

public event CustomWorkTimeEventHandler CustomWorkTime
Public Event CustomWorkTime As CustomWorkTimeEventHandler

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.

Remarks

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.

Examples

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.

WPFScheduler_CustomWorkTime

<dxsch:SchedulerControl CustomWorkTime="SchedulerControl_CustomWorkTime"
    GroupType="Resource"
    ResourceBrushSchemas="{StaticResource MyResourceSchemas}">
    <dxsch:SchedulerControl.ResourceItems>
        <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:SchedulerControl.ResourceItems>
    <dxsch:WeekView x:Name="weekView1"
        ResourcesPerPage="4"
        ShowAllDayArea="False"
        NavigationButtonsVisibility="Never"
        DateHeaderContentTemplate="{StaticResource DateHeaderControl.ContentTemplate}"/>
    <dxsch:TimelineView x:Name="timelineView1"/>
</dxsch:SchedulerControl>
See Also