Version

OnAfterAppointmentAdded Method

Raises the AfterAppointmentAdded event after an Appointment is added to the Appointments collection.
Syntax
'Declaration
 
Protected Overridable Sub OnAfterAppointmentAdded( _
   ByVal e As AppointmentEventArgs _
) 
protected virtual void OnAfterAppointmentAdded( 
   AppointmentEventArgs e
)

Parameters

e
A AppointmentEventArgs that provides data for the event.
Remarks

Raising an event invokes the event handler through a delegate.

The OnAfterAppointmentAdded method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

Notes to Inheritors: When overriding OnAfterAppointmentAdded in a derived class, be sure to call the base class's OnAfterAppointmentAdded method so that registered delegates receive the event.

Example
This example displays information about the new Appointment after it is added to the component's Appointments collection.

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_AfterAppointmentAdded(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinSchedule.AppointmentEventArgs) Handles ultraCalendarInfo1.AfterAppointmentAdded

        '----------------------------------------------------------------------------------------------------
        '	Description
        '	AfterAppointmentAdded
        '
        '	Fires after a new member is added to the component's Appointments collection
        '
        '	This example displays information about the new Appointment after it is added
        '----------------------------------------------------------------------------------------------------

        Dim info As String = String.Empty
        info += "A new Appointment was just added to the UltraCalendarInfo object:" + vbCrLf + vbCrLf
        info += "The new Appointment starts on: " + e.Appointment.StartDateTime.ToLongDateString() + vbCrLf
        info += "The new Appointment ends on: " + e.Appointment.EndDateTime.ToLongDateString() + vbCrLf
        info += "The new Appointment's start time is: " + e.Appointment.StartDateTime.ToLongTimeString() + vbCrLf
        info += "The new Appointment's end time is: " + e.Appointment.EndDateTime.ToLongTimeString() + vbCrLf

        info += "The new Appointment's Subject is: " + e.Appointment.Subject + vbCrLf
        info += "The new Appointment's Location is: " + e.Appointment.Location + vbCrLf
        info += "The new Appointment's Description is: " + e.Appointment.Description + vbCrLf

        MessageBox.Show(info, "AfterAppointmentAdded", MessageBoxButtons.YesNo)

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

		private void ultraCalendarInfo1_AfterAppointmentAdded(object sender, Infragistics.Win.UltraWinSchedule.AppointmentEventArgs e)
		{

			//----------------------------------------------------------------------------------------------------
			//	Description
			//	AfterAppointmentAdded
			//
			//	Fires after a new member is added to the component's Appointments collection
			//
			//	This example displays information about the new Appointment after it is added
			//----------------------------------------------------------------------------------------------------
			
			string info = string.Empty;
			info += "A new Appointment was just added to the UltraCalendarInfo object:" + "\n\n";
			info += "The new Appointment starts on: " + e.Appointment.StartDateTime.ToLongDateString() + "\n";
			info += "The new Appointment ends on: " + e.Appointment.EndDateTime.ToLongDateString() + "\n";
			info += "The new Appointment's start time is: " + e.Appointment.StartDateTime.ToLongTimeString() + "\n";
			info += "The new Appointment's end time is: " + e.Appointment.EndDateTime.ToLongTimeString() + "\n";

			info += "The new Appointment's Subject is: " + e.Appointment.Subject + "\n";
			info += "The new Appointment's Location is: " + e.Appointment.Location + "\n";
			info += "The new Appointment's Description is: " + e.Appointment.Description + "\n";
			
			MessageBox.Show( info, "AfterAppointmentAdded", MessageBoxButtons.YesNo );
		
		}
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