Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DayView.TimeSlots Property

Gets the View’s collection of time slots.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v24.2.dll

NuGet Package: DevExpress.Win.Scheduler

#Declaration

[XtraSerializableProperty(XtraSerializationVisibility.Collection, true, false, true)]
public TimeSlotCollection TimeSlots { get; }

#Property Value

Type Description
TimeSlotCollection

A TimeSlotCollection object that represents a time slot collection.

#Remarks

TimeSlot.gif

Use the TimeSlots property to specify the time intervals of time cells available for end-user selection in the Day View.

The TimeSlots property provides access to the TimeSlotCollection object which represents a collection of time slots within the Day View. The collection’s properties and methods can be used to manipulate individual collection items (instances of the TimeSlot class).

To add a custom time slot to the collection, add default time slots first and then add a custom time slot, as illustrated in the following code snippet:

// Add 20-minute time slots to the view.
scheduler.DayView.TimeSlots.AddRange(scheduler.DayView.DefaultTimeSlots);
scheduler.DayView.TimeSlots.Add(new DevExpress.XtraScheduler.TimeSlot(new TimeSpan(0, 20, 0), "20 minutes"));
See Also