Version

Enabled Property (WeekOfYear)

Determines the enabled state of this object.
Syntax
'Declaration
 
Public Property Enabled As Boolean
public bool Enabled {get; set;}
Remarks
You can use the Enabled property to selectively activate or deactivate an object. When an object is disabled, its appearance changes (based on the system disabled colors) and it becomes unavailable to the user. Certain properties or methods of the object may also be unavailable through code when it is disabled.
Example
This example uses the WeekOfYear object to display information about the first week of the year.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule

    Private Sub GetFirstWeekOfYearInfo()

        '	Get the first week of the year from the component's WeeksOfYear collection
        Dim weekOfYear As Infragistics.Win.UltraWinSchedule.WeekOfYear
        weekOfYear = Me.ultraCalendarInfo1.WeeksOfYear(1)

        '	Display the week number
        Dim info As String = String.Empty
        info += "Week number " + weekOfYear.WeekNumber.ToString()

        '	Display the WeekOfYear object's enabled state
        If (weekOfYear.Enabled) Then
            info += " is enabled."
        Else
            info += " is disabled."
        End If

        MessageBox.Show(info, "GetFirstWeekOfYearInfo", MessageBoxButtons.OK)

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

		private void GetFirstWeekOfYearInfo()
		{
			
			//	Get the first week of the year from the component's WeeksOfYear collection
			Infragistics.Win.UltraWinSchedule.WeekOfYear weekOfYear;
			weekOfYear = this.ultraCalendarInfo1.WeeksOfYear[ 1 ];

			//	Display the week number
			string info = string.Empty;
			info += "Week number " + weekOfYear.WeekNumber.ToString();

			//	Display the WeekOfYear object's enabled state
			if ( weekOfYear.Enabled )
				info += " is enabled.";
			else
				info += " is disabled.";

			MessageBox.Show( info, "GetFirstWeekOfYearInfo", MessageBoxButtons.OK );

		}
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