Version

CalendarInfoChangedEventArgs Class

Event parameters used for the UltraCalendarInfo.CalendarInfoChanged event.
Syntax
'Declaration
 
Public Class CalendarInfoChangedEventArgs 
   Inherits System.EventArgs
public class CalendarInfoChangedEventArgs : System.EventArgs 
Example
This example outputs information about the change to the debugger, including, where applicable, recursive information about each change from the original source on down.

For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.

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

    Private Sub ultraCalendarInfo1_CalendarInfoChanged(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinSchedule.CalendarInfoChangedEventArgs) Handles ultraCalendarInfo1.CalendarInfoChanged

        '----------------------------------------------------------------------------------------------------
        '	Description
        '	CalendarInfoChanged
        '
        '	The CalendarInfoChanged event fires when any property of the UltraCalendarInfo object has changed.
        '	Since the UltraCalendarInfo object has several object properties (e.g., ActiveDay, Appointments, etc.)
        '	the CalendarInfoChangedEventArgs' PropChangeInfo object property can contain nested PropChangeInfo
        '	objects, stored by the Trigger property. By walking up the parent chain recursively, a highly detailed
        '	"recording" of the sequence of events that caused the property change notification can be produced.
        '
        '----------------------------------------------------------------------------------------------------

        Debug.WriteLine("**********CalendarInfoChanged event fired (begin)**********")
        Dim pci As PropChangeInfo = e.PropChangeInfo

        '	Output the PropID
        Debug.WriteLine("PropID = " + pci.PropId.ToString())

        '	Output the Source
        If (pci.Source Is Nothing) Then
            Debug.WriteLine("Source Is Nothing")
        Else
            Debug.WriteLine("Source = " + pci.Source.ToString())

            '	Output the Trigger
            If (pci.Trigger Is Nothing) Then
                Debug.WriteLine("Trigger Is Nothing")
            Else
                Debug.WriteLine("Trigger = " + pci.Trigger.ToString())

                '	Walk up the parent notification chain until we hit a null Trigger
                '	with each recursion, output information about the change to
                '	the debugger, indenting each level for readability
                Dim tabChars As String = Chr(9)
                While Not pci.Trigger Is Nothing
                    '	Recurse by getting the current Trigger's Trigger
                    pci = pci.Trigger

                    If pci.Trigger Is Nothing Then Exit While

                    '	Output the PropID
                    Debug.WriteLine(tabChars + "PropID = " + pci.PropId.ToString())

                    '	Output the Source
                    If (pci.Source Is Nothing) Then
                        Debug.WriteLine(tabChars + "Source Is Nothing")
                    Else
                        Debug.WriteLine(tabChars + "Source = " + pci.Source.ToString())

                        '	Output the Trigger
                        If (pci.Trigger Is Nothing) Then
                            Debug.WriteLine(tabChars + "Trigger Is Nothing")
                        Else
                            Debug.WriteLine(tabChars + "Trigger = " + pci.Trigger.ToString())

                            '	Get ready for the next recursion by increasing the indentation
                            tabChars += tabChars
                        End If
                    End If

                End While
            End If
        End If

        Debug.WriteLine("**********CalendarInfoChanged event fired (end)**********")
        Debug.WriteLine("")

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

		private void ultraCalendarInfo1_CalendarInfoChanged(object sender, Infragistics.Win.UltraWinSchedule.CalendarInfoChangedEventArgs e)
		{

			//----------------------------------------------------------------------------------------------------
			//	Description
			//	CalendarInfoChanged
			//
			//	The CalendarInfoChanged event fires when any property of the UltraCalendarInfo object has changed.
			//	Since the UltraCalendarInfo object has several object properties (e.g., ActiveDay, Appointments, etc.)
			//	the CalendarInfoChangedEventArgs' PropChangeInfo object property can contain nested PropChangeInfo
			//	objects, stored by the Trigger property. By walking up the parent chain recursively, a highly detailed
			//	"recording" of the sequence of events that caused the property change notification can be produced.
			//
			//----------------------------------------------------------------------------------------------------

			Debug.WriteLine( "**********CalendarInfoChanged event fired (begin)**********" );
			PropChangeInfo pci = e.PropChangeInfo;

			//	Output the PropID
			Debug.WriteLine( "PropID = " + pci.PropId.ToString() );

			//	Output the Source
			if ( pci.Source == null )
				Debug.WriteLine( "Source = null" );
			else
				Debug.WriteLine( "Source = " + pci.Source.ToString() );

			//	Output the Trigger
			if ( pci.Trigger == null )
				Debug.WriteLine( "Trigger = null" );
			else
				Debug.WriteLine( "Trigger = " + pci.Trigger.ToString() );

			//	Walk up the parent notification chain until we hit a null Trigger;
			//	with each recursion, output information about the change to
			//	the debugger, indenting each level for readability
			string tabChars = ((char)(9)).ToString();
			while( pci.Trigger != null )
			{
				//	Recurse by getting the current Trigger's Trigger
				pci = pci.Trigger;

				if ( pci.Trigger == null )
					break;

				//	Output the PropID
				Debug.WriteLine( tabChars + "PropID = " + pci.PropId.ToString() );

				//	Output the Source
				if ( pci.Source == null )
					Debug.WriteLine( tabChars + "Source = null" );
				else
					Debug.WriteLine( tabChars + "Source = " + pci.Source.ToString() );

				//	Output the Trigger
				if ( pci.Trigger == null )
					Debug.WriteLine( tabChars + "Trigger = null" );
				else
					Debug.WriteLine( tabChars + "Trigger = " + pci.Trigger.ToString() );

				//	Get ready for the next recursion by increasing the indentation
				tabChars += tabChars;

			}

			Debug.WriteLine( "**********CalendarInfoChanged event fired (end)**********" );
			Debug.WriteLine("");
			
		}
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