Back to Devexpress

SchedulerControl.WorkTime Property

wpf-devexpress-dot-xpf-dot-scheduling-dot-schedulercontrol-e3731c6d.md

latest4.2 KB
Original Source

SchedulerControl.WorkTime Property

Gets or sets the work time interval. This is a dependency property.

Namespace : DevExpress.Xpf.Scheduling

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

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

csharp
public TimeSpanRange WorkTime { get; set; }
vb
Public Property WorkTime As TimeSpanRange

Property Value

TypeDescription
TimeSpanRange

A TimeSpanRange object which specifies the work time interval.

|

Remarks

Use the WorkTime property when the DayViewBase.ShowWorkTimeOnly property is set to true to limit the data shown in a Day View, Work Week View, and Week View to the hours in a working day. Note that working hours are painted with a lighter color than non-working hours. This allows end-users to easily distinguish these two periods within a view, if both working and non-working hours are visible.

The image below shows the Day view with the working time set to 10:00 AM - 13:00 PM.

The WorkTime property also specifies the work time interval for the Timeline View when the it is scaled to hours or work hours.

xaml
<dxsch:SchedulerControl x:Name="scheduler" WorkTime="10:00:00-13:00:00">
    <dxsch:TimelineView x:Name="timelineView" IntervalCount="9">
        <dxsch:TimelineView.TimeScales>
            <dxsch:TimeScaleWorkDay x:Name="scaleWorkDay" IsEnabled="True"/>
            <dxsch:TimeScaleWorkHour x:Name="scaleWorkHour" IsEnabled="True"/>
        </dxsch:TimelineView.TimeScales>
    </dxsch:TimelineView>
</dxsch:SchedulerControl>

The following code snippets (auto-collected from DevExpress Examples) contain references to the WorkTime property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-scheduler-customize-context-menus/CS/DXScheduler_PopUpMenuCustomization/MainWindow.xaml#L20

xml
WorkDays="WorkDays,Saturday"
                    WorkTime="06:00:00-23:00:00">
<dxsch:SchedulerControl.DataSource>

wpf-scheduler-handle-popupmenushowing-event-to-customize-context-menus/CS/PopUpMenuShowingEvent/MainWindow.xaml#L15

xml
WorkDays="WorkDays,Saturday"
WorkTime="06:00:00-23:00:00"
PopupMenuShowing="scheduler_PopupMenuShowing">

See Also

ShowWorkTimeOnly

WorkDays

SchedulerControl Class

SchedulerControl Members

DevExpress.Xpf.Scheduling Namespace