Version

OnAfterNoteRemoved Method

Raises the AfterNoteRemoved event before a Note is removed from the Notes collection.
Syntax
'Declaration
 
Protected Overridable Sub OnAfterNoteRemoved( _
   ByVal e As EventArgs _
) 
protected virtual void OnAfterNoteRemoved( 
   EventArgs e
)

Parameters

e
A System.EventArgs that provides data for the event.
Remarks

Raising an event invokes the event handler through a delegate.

The OnAfterNoteRemoved 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 OnAfterNoteRemoved in a derived class, be sure to call the base class's OnAfterNoteRemoved method so that registered delegates receive the event.

Example
This example informs the end user than a Note was removed from the collection, prompting to see if they would like to add another Note for the ActiveDay.

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_AfterNoteRemoved(ByVal sender As Object, ByVal e As System.EventArgs) Handles ultraCalendarInfo1.AfterNoteRemoved

        '----------------------------------------------------------------------------------------------------
        '	Description
        '	AfterNoteRemoved
        '
        '	Fires after an existing member is removed from the component's Notes collection
        '
        '----------------------------------------------------------------------------------------------------

        Dim result As DialogResult = MessageBox.Show("A Note was just removed from the UltraCalendarInfo object." + "\n" + "Would you like to add a new Note for the ActiveDay?", "AfterNoteRemoved", MessageBoxButtons.YesNo)

        If (result = DialogResult.No) Then Return

        Dim startDate As DateTime = Me.ultraCalendarInfo1.ActiveDay.Date
        Me.ultraCalendarInfo1.Notes.Add(startDate, "My Note")

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

		private void ultraCalendarInfo1_AfterNoteRemoved(object sender, System.EventArgs e)
		{		

			//----------------------------------------------------------------------------------------------------
			//	Description
			//	AfterNoteRemoved
			//
			//	Fires after an existing member is removed from the component's Notes collection
			//
			//----------------------------------------------------------------------------------------------------

			DialogResult result = MessageBox.Show( "A Note was just removed from the UltraCalendarInfo object." + "\n" + "Would you like to add a new Note for the ActiveDay?", "AfterNoteRemoved", MessageBoxButtons.YesNo );

			if ( result == DialogResult.No )
				return;

			DateTime startDate = this.ultraCalendarInfo1.ActiveDay.Date;
			this.ultraCalendarInfo1.Notes.Add( startDate, "My Note" );
		
		}
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