Version

WeeksOfYear Property

Returns a collection of 54 WeekOfYear objects.
Syntax
'Declaration
 
Public ReadOnly Property WeeksOfYear As WeeksOfYearCollection
public WeeksOfYearCollection WeeksOfYear {get;}
Example
This example uses the WeeksOfYear property to disable every fifth week of the year.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports System.IO
Imports System.Globalization

    Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click

        '	Iterate the weeks of the year
        Dim weekOfYear As WeekOfYear
        For Each weekOfYear In Me.ultraCalendarInfo1.WeeksOfYear
            '	If the week number is divisible by 5, disable it
            If ((weekOfYear.WeekNumber Mod 5) = 0) Then
                weekOfYear.Enabled = False
            End If
        Next

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

		private void button1_Click(object sender, System.EventArgs e)
		{
			
			//	Iterate the weeks of the year
			foreach ( WeekOfYear weekOfYear in this.ultraCalendarInfo1.WeeksOfYear )
			{
				//	If the week number is divisible by 5, disable it
				if ( ( weekOfYear.WeekNumber % 5 ) == 0 )
					weekOfYear.Enabled = false;
			}
		
		}
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