TimeInterval Class
A time interval object.
Namespace: DevExpress.XtraScheduler
Assembly: DevExpress.XtraScheduler.v20.2.Core.dll
Declaration
public class TimeInterval :
ICloneable,
IXtraSupportShouldSerialize
Public Class TimeInterval
Implements ICloneable,
IXtraSupportShouldSerialize
Related API Members
The following members accept/return TimeInterval objects:
Related API Members
The following members accept/return TimeInterval objects:
Remarks
The TimeInterval class is used to represent a specific time interval within the scheduler control.
The properties and methods declared by the TimeInterval class allows a time interval to be defined (see the TimeInterval.Start, TimeInterval.End, TimeInterval.Duration, TimeInterval.AllDay) and manipulated (TimeInterval.Intersect, TimeInterval.Subtract, TimeInterval.IntersectsWith, TimeInterval.Contains, TimeInterval.SameDay, TimeInterval.LongerThanADay, etc).
Instances of the TimeInterval class are held by the TimeIntervalCollection object and can be accessed via the collection’s Item property using index notation.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the TimeInterval class.
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.
how-to-display-hijri-months-with-alternate-colors-e2213/CS/WindowsApplication1/HijriCalendar.cs#L23
public void FillHijriMonths(TimeInterval visibleInterval) {
DateTime start = visibleInterval.Start;
public static class AgendaViewDataGenerator {
public static TimeInterval SelectedInterval { get; set; }
winforms-schedulercontrol-api-t224044/CS/SchedulerAPISample/CodeExamples/AppointmentExamples.cs#L12
// Select time interval
scheduler.ActiveView.SetSelection(new TimeInterval(DateTime.Now, new TimeSpan(2, 40, 0)), scheduler.ActiveView.GetResources()[1]);
// Group by resource.
how-to-find-free-time-intervals-for-a-meeting-arrangement-e508/CS/FreeTimeIntervals/Form1.cs#L32
DateTime startOfWeek = DevExpress.XtraScheduler.Native.DateTimeHelper.GetStartOfWeek(start);
TimeInterval interval = new TimeInterval(start, startOfWeek.AddDays(7));
TimeInterval freeTime = FindInterval(interval, duration);
public static class AgendaViewDataGenerator {
public static TimeInterval SelectedInterval { get; set; }
Public NotInheritable Class AgendaViewDataGenerator
Public Shared Property SelectedInterval() As TimeInterval
how-to-display-hijri-months-with-alternate-colors-e2213/VB/WindowsApplication1/HijriCalendar.vb#L32
Public Sub FillHijriMonths(ByVal visibleInterval As TimeInterval)
Dim start As DateTime = visibleInterval.Start
winforms-schedulercontrol-api-t224044/VB/SchedulerAPISample/CodeExamples/AppointmentExamples.vb#L12
' Select time interval
scheduler.ActiveView.SetSelection(New TimeInterval(Date.Now, New TimeSpan(2, 40, 0)), scheduler.ActiveView.GetResources()(1))
' Group by resource.
how-to-find-free-time-intervals-for-a-meeting-arrangement-e508/VB/FreeTimeIntervals/Form1.vb#L46
Dim startOfWeek As Date = DevExpress.XtraScheduler.Native.DateTimeHelper.GetStartOfWeek(start)
Dim interval As New TimeInterval(start, startOfWeek.AddDays(7))
Dim freeTime As TimeInterval = FindInterval(interval, duration)
Public NotInheritable Class AgendaViewDataGenerator
Public Shared Property SelectedInterval() As TimeInterval
Inheritance
No
We appreciate your feedback and continued support.
May we contact you if we need to discuss your feedback in greater detail or update you on changes to this help topic?