Imports System.Diagnostics Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Private Sub Button19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button19.Click Debug.WriteLine("List of selected date ranges (total: " + Me.UltraCalendarInfo1.SelectedDateRanges.Count.ToString() + ")") Debug.IndentLevel += 1 ' Iterate through the selected date ranges in UltraCalendarInfo's ' SelectedDateRanges collection and display information about each range ' in the output window. Dim rangeNumber As Integer = 1 Dim dateRange As DateRange For Each dateRange In Me.UltraCalendarInfo1.SelectedDateRanges Debug.WriteLine("Info for date range #" + rangeNumber.ToString() + " ------------") rangeNumber += 1 Debug.IndentLevel += 1 Debug.WriteLine("StartDate: " + dateRange.StartDate.ToShortDateString()) Debug.WriteLine("StartDate Day of week: " + dateRange.FirstDay.DayOfWeek.DayOfTheWeek.ToString()) Debug.WriteLine("EndDate: " + dateRange.EndDate.ToShortDateString()) Debug.WriteLine("EndDate Day of week: " + dateRange.LastDay.DayOfWeek.DayOfTheWeek.ToString()) Debug.IndentLevel -= 1 Next Debug.IndentLevel -= 1 End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; private void button19_Click(object sender, System.EventArgs e) { Debug.WriteLine("List of selected date ranges (total: " + this.ultraCalendarInfo1.SelectedDateRanges.Count.ToString() + ")"); Debug.IndentLevel++; // Iterate through the selected date ranges in UltraCalendarInfo's // SelectedDateRanges collection and display information about each range // in the output window. int rangeNumber = 1; foreach(DateRange dateRange in this.ultraCalendarInfo1.SelectedDateRanges) { Debug.WriteLine("Info for date range #" + rangeNumber.ToString() + " ------------"); rangeNumber++; Debug.IndentLevel++; Debug.WriteLine("StartDate: " + dateRange.StartDate.ToShortDateString()); Debug.WriteLine("StartDate Day of week: " + dateRange.FirstDay.DayOfWeek.DayOfTheWeek.ToString()); Debug.WriteLine("EndDate: " + dateRange.EndDate.ToShortDateString()); Debug.WriteLine("EndDate Day of week: " + dateRange.LastDay.DayOfWeek.DayOfTheWeek.ToString()); Debug.IndentLevel--; } Debug.IndentLevel--; }
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