Version

IsSelected Property (Holiday)

Returns whether the Holiday is selected.
Syntax
'Declaration
 
Public Overrides ReadOnly Property IsSelected As Boolean
public override bool IsSelected {get;}
Example
This example demonstrates how the use the Holiday object.

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

    Private Sub SetupHoliday()

        '	Add a new holiday object to the component's Holidays collection,
        '	for the current date but as yet unnamed
        Dim holiday As Holiday = Me.ultraCalendarInfo1.Holidays.Add(DateTime.Today, String.Empty)

        '	Make sure we have the right starting date
        Debug.Assert((holiday.StartDate.Date = DateTime.Today.Date), "Error creating the holiday.")

        '	Set the name of the holiday to the long description of the
        '	day of the week it falls on
        holiday.Name = holiday.Day.DayOfWeek.LongDescriptionResolved

        '	Set the length of the holiday to one day
        holiday.NumberOfDays = 1

        '	Make the holiday selected, and verify that the setting was applied
        holiday.Selected = True
        Debug.Assert(holiday.IsSelected, "Unable to set the holiday's Selected property to true.")

        '	Hide the holiday if there are any appointments for the same day
        If (holiday.Day.Appointments.Count > 0) Then
            holiday.Visible = False
        End If

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

		private void SetupHoliday()
		{

			//	Add a new holiday object to the component's Holidays collection,
			//	for the current date but as yet unnamed
			Holiday holiday = this.ultraCalendarInfo1.Holidays.Add( DateTime.Today, string.Empty );

			//	Make sure we have the right starting date
			Debug.Assert( (holiday.StartDate.Date == DateTime.Today.Date), "Error creating the holiday." );

			//	Set the name of the holiday to the long description of the
			//	day of the week it falls on
			holiday.Name = holiday.Day.DayOfWeek.LongDescriptionResolved;

			//	Set the length of the holiday to one day
			holiday.NumberOfDays = 1;

			//	Make the holiday selected, and verify that the setting was applied
			holiday.Selected = true;
			Debug.Assert ( holiday.IsSelected, "Unable to set the holiday's Selected property to true." );

			//	Hide the holiday if there are any appointments for the same day
			if ( holiday.Day.Appointments.Count > 0 )
				holiday.Visible = 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