Back to Devexpress

DayView.ShowWorkTimeOnly Property

windowsforms-devexpress-dot-xtrascheduler-dot-dayview-6d9b5980.md

latest4.4 KB
Original Source

DayView.ShowWorkTimeOnly Property

Gets or sets a value indicating if the scheduler should show its data only for the working hours in the Day View, Work-Week View and the Full Week View.

Namespace : DevExpress.XtraScheduler

Assembly : DevExpress.XtraScheduler.v25.2.dll

NuGet Package : DevExpress.Win.Scheduler

Declaration

csharp
[DefaultValue(false)]
[XtraSerializableProperty]
public bool ShowWorkTimeOnly { get; set; }
vb
<DefaultValue(False)>
<XtraSerializableProperty>
Public Property ShowWorkTimeOnly As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true to show data for working hours only; otherwise, false.

|

Remarks

The time interval for the working day in a Day View is specified via its DayView.WorkTime property.

When different work time intervals are specified in the SchedulerControl.QueryWorkTime event handler, the DayView.ShowWorkTimeOnly option has no effect.

Note

If the ShowWorkTimeOnly is set to true , and the DayView.WorkTime and DayView.VisibleTime properties are set to different intervals, the Scheduler view 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.

winforms-scheduler-recurrence-series-occurrencecalculator/CS/OccurrenceCalculatorSample/Form1.cs#L19

csharp
schedulerControl1.ActiveViewType = SchedulerViewType.FullWeek;
schedulerControl1.FullWeekView.ShowWorkTimeOnly = true;
ribbonControl1.SelectedPage = ribbonPage1;

winforms-scheduler-hit-testing/CS/HitTest/Form1.cs#L16

csharp
InitializeComponent();
schedulerControl1.DayView.ShowWorkTimeOnly = true;
schedulerControl1.Start = DateTime.Now.Date;

winforms-scheduler-recurrence-series-occurrencecalculator/VB/OccurrenceCalculatorSample/Form1.vb#L17

vb
schedulerControl1.ActiveViewType = SchedulerViewType.FullWeek
schedulerControl1.FullWeekView.ShowWorkTimeOnly = True
ribbonControl1.SelectedPage = ribbonPage1

winforms-scheduler-hit-testing/VB/HitTest/Form1.vb#L15

vb
InitializeComponent()
schedulerControl1.DayView.ShowWorkTimeOnly = True
schedulerControl1.Start = Date.Now.Date

See Also

WorkTime

DayView Class

DayView Members

DevExpress.XtraScheduler Namespace