Skip to main content
A newer version of this page is available. .

DayView.TimeSlots Property

Gets the View’s collection of time slots.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v18.1.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"));

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the TimeSlots 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.

See Also