A collection of TimeSlot objects.
The following code demonstrates how to interate thru the UltraDayView's TiimeSlots collection and access properties of each contained TimeSlot object.
Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Private Sub Button16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button16.Click
' Interate thru each time slot in the TimeSlotsCollection and display information
' about each one in the output window.
Debug.WriteLine("Time slots list (" + Me.UltraDayView1.TimeSlots.Count.ToString() + " total time slots)")
Debug.IndentLevel += 1
Dim timeSlot As TimeSlot
For Each timeSlot In Me.UltraDayView1.TimeSlots
Debug.WriteLine("Info for Time Slot: " + timeSlot.StartTime.ToShortTimeString() + "-" + timeSlot.EndTime.ToShortTimeString() + " --------------")
Debug.IndentLevel += 1
Debug.WriteLine("Index: " + timeSlot.Index.ToString())
If timeSlot.IsVisible = True Then
Debug.WriteLine("Time slot is currently visible")
Else
Debug.WriteLine("Time slot is currently NOT visible")
End If
Debug.IndentLevel -= 1
Next
Debug.IndentLevel -= 1
Debug.WriteLine("End of time slots list")
End Sub
'Declaration
Public Class TimeSlotsCollection
Inherits Infragistics.Shared.SubObjectsCollectionBase
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;
private void button16_Click(object sender, System.EventArgs e)
{
// Interate thru each time slot in the TimeSlotsCollection and display information
// about each one in the output window.
Debug.WriteLine("Time slots list (" + this.ultraDayView1.TimeSlots.Count.ToString() + " total time slots)");
Debug.IndentLevel++;
foreach(TimeSlot timeSlot in this.ultraDayView1.TimeSlots)
{
Debug.WriteLine("Info for Time Slot: " + timeSlot.StartTime.ToShortTimeString() + "-" + timeSlot.EndTime.ToShortTimeString() + " --------------");
Debug.IndentLevel++;
Debug.WriteLine("Index: " + timeSlot.Index.ToString());
if (timeSlot.IsVisible == true)
Debug.WriteLine("Time slot is currently visible");
else
Debug.WriteLine("Time slot is currently NOT visible");
Debug.IndentLevel--;
}
Debug.IndentLevel--;
Debug.WriteLine("End of time slots list");
}
'Declaration
Public Class TimeSlotsCollection
Inherits Infragistics.Shared.SubObjectsCollectionBase
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2