windowsforms-devexpress-dot-xtrascheduler-dot-dayview-fbab5f8a.md
Gets the View’s collection of time slots.
Namespace : DevExpress.XtraScheduler
Assembly : DevExpress.XtraScheduler.v25.2.dll
NuGet Package : DevExpress.Win.Scheduler
[XtraSerializableProperty(XtraSerializationVisibility.Collection, true, false, true)]
public TimeSlotCollection TimeSlots { get; }
<XtraSerializableProperty(XtraSerializationVisibility.Collection, True, False, True)>
Public ReadOnly Property TimeSlots As TimeSlotCollection
| Type | Description |
|---|---|
| TimeSlotCollection |
A TimeSlotCollection object that represents a time slot collection.
|
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"));
' 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