Version

Enabled Property (DayOfMonth)

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 DaysOfMonth collection property to disable the first day of all months in all years.

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 button4.Click

        Me.DisableFirstDayOfMonth()

    End Sub


    Private Sub DisableFirstDayOfMonth()

        '	Get a DayOfMonth object for the first day of the month
        '	Note that the DaysOfMonth collection is one-based so as
        '	to be more intuitive to use
        Dim dayOfMonth As Infragistics.Win.UltraWinSchedule.DayOfMonth
        dayOfMonth = Me.ultraCalendarInfo1.DaysOfMonth(1)

        '	Assert that we got the one we expected
        Debug.Assert(dayOfMonth.DayNumber = 1, "Wrong DayOfMonth returned in 'DisableFirstDayOfMonth'!")

        '	Disable the first day of the month
        If (dayOfMonth.DayNumber = 1) Then
            dayOfMonth.Enabled = False
        End If

    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)
		{
			
			this.DisableFirstDayOfMonth();
		
		}


		private void DisableFirstDayOfMonth()
		{

			//	Get a DayOfMonth object for the first day of the month
			//	Note that the DaysOfMonth collection is one-based so as
			//	to be more intuitive to use
			Infragistics.Win.UltraWinSchedule.DayOfMonth dayOfMonth;
			dayOfMonth = this.ultraCalendarInfo1.DaysOfMonth[ 1 ];

			//	Assert that we got the one we expected
			Debug.Assert( dayOfMonth.DayNumber == 1, "Wrong DayOfMonth returned in 'DisableFirstDayOfMonth'!" );

			//	Disable the first day of the month
			if ( dayOfMonth.DayNumber == 1 )
				dayOfMonth.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