Back to Devexpress

DayViewBase.ShowWorkTimeOnly Property

wpf-devexpress-dot-xpf-dot-scheduling-dot-dayviewbase-78e82718.md

latest4.6 KB
Original Source

DayViewBase.ShowWorkTimeOnly Property

Gets or sets a value indicating whether the SchedulerControl should show its data only for the working hours in the Day View, Work Week View, and Week View. This is a dependency property.

Namespace : DevExpress.Xpf.Scheduling

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

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

csharp
public bool ShowWorkTimeOnly { get; set; }
vb
Public Property ShowWorkTimeOnly As Boolean

Property Value

TypeDescription
Boolean

true, to show work hours only; otherwise, false.

|

Remarks

Use the SchedulerControl.WorkTime property to specify the time interval for the working day.

Note

If the DayViewBase.ShowWorkTimeOnly option is true , and the SchedulerControl.WorkTime and DayViewBase.VisibleTime properties are set to different intervals, the scheduler displays an interval that is an intersection of the specified intervals.

The following code snippets (auto-collected from DevExpress Examples) contain references to the ShowWorkTimeOnly 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-specify-custom-edit-and-recurrence-dialogs/CS/CustomMvvmFormWithRecurrenceExample/MainWindow.xaml#L26

xml
ShowAllDayArea="False"
    ShowWorkTimeOnly="True" />
<dxsch:WorkWeekView

wpf-scheduler-customize-appointment-appearance/CS/CustomizeAppointmentExample/MainWindow.xaml#L92

xml
ShowAllDayArea="False"
ShowWorkTimeOnly="True"
DayCount="3"/>

wpf-scheduler-implement-custom-mapping-converter-for-color-values/CS/ColorMappingExample/MainWindow.xaml#L66

xml
DayCount="2"
        ShowWorkTimeOnly="True" />
</dxsch:SchedulerControl>

wpf-scheduler-apply-end-user-restrictions/CS/WpfApplication1/MainWindow.xaml#L22

xml
<!--endregion #main-->
<dxsch:DayView x:Name="dayView1" ResourcesPerPage="2" ShowWorkTimeOnly="True"/>
<dxsch:SchedulerControl.DataSource>

wpf-scheduler-generate-time-rulers-from-view-model-collection/CS/WpfSchedulerTimeRulers/MainWindow.xaml#L28

xml
<dxsch:SchedulerControl x:Name="scheduler">
    <dxsch:DayView x:Name="dayView" ShowWorkTimeOnly="True" TimeScale="00:30:00" TimeRulersSource="{Binding TimeRulers}" TimeRulerTemplate="{StaticResource TimeRulerGeneratorTemplate}"/>
</dxsch:SchedulerControl>

See Also

WorkTime

DayViewBase Class

DayViewBase Members

DevExpress.Xpf.Scheduling Namespace