Version

Day Property (VisibleDay)

Returns the Day object associated with this VisibleDay.
Syntax
'Declaration
 
Public ReadOnly Property Day As Day
public Day Day {get;}
Example
The following code demonstrates how to interate thru the UltraDayView's VisibleDays collection and access properties of each contained VisibleDay object.

Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule

	Private Sub Button17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button17.Click

		' Iterate thru the UltraDayView's VisibleDayCollection and display information
		' about each day in the output window.
		Debug.WriteLine("Visible days list (" + Me.UltraDayView1.VisibleDays.Count.ToString() + " total visible days)")
		Debug.IndentLevel += 1

		Dim visibleDay As VisibleDay
		For Each visibleDay In Me.UltraDayView1.VisibleDays
			Debug.WriteLine("Info for VisibleDay: " + visibleDay.Date.ToShortDateString() + " --------------")

			Debug.IndentLevel += 1

			Debug.WriteLine("Day of the week: " + visibleDay.Day.DayOfWeek.DayOfTheWeek.ToString())

			' Display a list of appointments for this visible day (if any)
			Dim appointmentsStartTime As New DateTime(visibleDay.Date.Year, visibleDay.Date.Month, visibleDay.Date.Day, 0, 0, 0)
			Dim appointmentsEndTime As New DateTime(visibleDay.Date.Year, visibleDay.Date.Month, visibleDay.Date.Day, 23, 59, 0)

			Dim visibleDayAppointments As AppointmentsSubsetCollection = visibleDay.GetAppointments(appointmentsStartTime, appointmentsEndTime)
			If (visibleDayAppointments.Count > 0) Then
				Debug.WriteLine("Appointments for the day -----------------------")

				Debug.IndentLevel += 1

				Dim appointment As Appointment
				For Each appointment In visibleDayAppointments
					Debug.WriteLine("Appointment '" + appointment.Subject + "'  (" + appointment.StartDateTime.ToString("M/d/yyyy hh:mm tt") + "-" + appointment.EndDateTime.ToString("M/d/yyyy hh:mm tt") + ")")
				Next

				Debug.IndentLevel -= 1

				Debug.WriteLine("End of Appointments for the day")
			End If

			Debug.IndentLevel -= 1
		Next

		Debug.IndentLevel -= 1

		Debug.WriteLine("End of visible days list")

	End Sub
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;

		private void button17_Click(object sender, System.EventArgs e)
		{

			// Iterate thru the UltraDayView's VisibleDayCollection and display information
			// about each day in the output window.
			Debug.WriteLine("Visible days list (" + this.ultraDayView1.VisibleDays.Count.ToString() + " total visible days)");
			Debug.IndentLevel++;

			foreach(VisibleDay visibleDay in this.ultraDayView1.VisibleDays)
			{
				Debug.WriteLine("Info for VisibleDay: " + visibleDay.Date.ToShortDateString() + " --------------");

				Debug.IndentLevel++;

				Debug.WriteLine("Day of the week: " + visibleDay.Day.DayOfWeek.DayOfTheWeek.ToString());

				// Display a list of appointments for this visible day (if any)
				DateTime appointmentsStartTime	= new DateTime(visibleDay.Date.Year, visibleDay.Date.Month, visibleDay.Date.Day, 0, 0, 0);
				DateTime appointmentsEndTime		= new DateTime(visibleDay.Date.Year, visibleDay.Date.Month, visibleDay.Date.Day, 23, 59, 0);

				AppointmentsSubsetCollection visibleDayAppointments = visibleDay.GetAppointments(appointmentsStartTime, appointmentsEndTime);
				if (visibleDayAppointments.Count > 0)
				{
					Debug.WriteLine("Appointments for the day -----------------------");

					Debug.IndentLevel++;

					foreach(Appointment appointment in visibleDayAppointments)
					{
						Debug.WriteLine("Appointment '" + appointment.Subject + "'  (" + appointment.StartDateTime.ToString("M/d/yyyy hh:mm tt") + "-" + appointment.EndDateTime.ToString("M/d/yyyy hh:mm tt") + ")");
					}


					Debug.IndentLevel--;

					Debug.WriteLine("End of Appointments for the day");
				}

				Debug.IndentLevel--;
			}

			Debug.IndentLevel--;

			Debug.WriteLine("End of visible days list");

		}
Requirements

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

See Also