Raising an event invokes the event handler through a delegate.
The OnAfterSelectedAppointmentsChange 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 OnAfterSelectedAppointmentsChange in a derived class, be sure to call the base class's OnAfterSelectedAppointmentsChange method so that registered delegates receive the event.
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Imports System.Diagnostics Private Sub ultraCalendarInfo1_AfterSelectedAppointmentsChange(ByVal sender As Object, ByVal e As System.EventArgs) Handles ultraCalendarInfo1.AfterSelectedAppointmentsChange '---------------------------------------------------------------------------------------------------- ' Description ' AfterSelectedAppointmentsChange ' ' Fires after one or more Appointment(s) are selected or deselected. ' ' This example displays the new count of the SelectedAppointments collection '---------------------------------------------------------------------------------------------------- MessageBox.Show("The number of selected Appointments is " + Me.ultraCalendarInfo1.SelectedAppointments.Count.ToString() + "\n", "AfterSelectedAppointmentsChange", MessageBoxButtons.OK) End Sub
using System.Diagnostics; using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; private void ultraCalendarInfo1_AfterSelectedAppointmentsChange(object sender, System.EventArgs e) { //---------------------------------------------------------------------------------------------------- // Description // AfterSelectedAppointmentsChange // // Fires after one or more Appointment(s) are selected or deselected. // // This example displays the new count of the SelectedAppointments collection //---------------------------------------------------------------------------------------------------- MessageBox.Show( "The number of selected Appointments is " + this.ultraCalendarInfo1.SelectedAppointments.Count.ToString() + "\n", "AfterSelectedAppointmentsChange", MessageBoxButtons.OK ); }
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