Skip to main content

DayView.TimeSlots Property

Gets the View’s collection of time slots.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v24.2.dll

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