'Declaration Public Event BeforeDisplayMonthPopup As BeforeDisplayMonthPopupEventHandler
public event BeforeDisplayMonthPopupEventHandler BeforeDisplayMonthPopup
The event handler receives an argument of type BeforeDisplayMonthPopupEventArgs containing data related to this event. The following BeforeDisplayMonthPopupEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Cancel (Inherited from System.ComponentModel.CancelEventArgs) | |
Month | Returns the month for which the popup will be displayed. |
If the UltraMonthViewMultiBase.AllowMonthPopup is set to true, the Infragistics.Win.UltraWinSchedule.MonthViewMulti.UltraMonthPopupControl is displayed when the user presses the left mouse button down on the Infragistics.Win.UltraWinSchedule.MonthViewMulti.MonthHeaderAreaUIElement. The Infragistics.Win.UltraWinSchedule.MonthViewMulti.UltraMonthPopupControl displays 3 months prior to and after the current month in a scrolling list allowing the user to quickly navigate a particular month to the location when the month header was pressed.
The BeforeDisplayMonthPopup event may be canceled using System.ComponentModel.CancelEventArgs.Cancel property to prevent the control from displaying the Infragistics.Win.UltraWinSchedule.MonthViewMulti.UltraMonthPopupControl.
The BeforeDisplayMonthPopupEventArgs.Month property returns the Month object whose Infragistics.Win.UltraWinSchedule.MonthViewMulti.MonthHeaderAreaUIElement was clicked upon.
Private Sub ultraMonthViewMulti1_BeforeDisplayMonthPopup(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinSchedule.BeforeDisplayMonthPopupEventArgs) Handles ultraMonthViewMulti1.BeforeDisplayMonthPopup ' The BeforeDisplayMonthPopup event is a "cancelable" event, ' which means that the action to which it corresponds can be ' prevented from happening by canceling the event. ' ' Canceling an event is very simple - just set the 'Cancel' ' property of the event arguments to true. The action will then ' be prevented from happening, and the corresponding "After" ' event will not fire. ' If the month for which the popup is being displayed is ' not in the current year, we will cancel the event, effectively ' diallowing the displaying of the popup. If (e.Month.Year.YearNumber <> DateTime.Today.Year) Then e.Cancel = True End If End Sub
private void ultraMonthViewMulti1_BeforeDisplayMonthPopup(object sender, Infragistics.Win.UltraWinSchedule.BeforeDisplayMonthPopupEventArgs e) { // The BeforeDisplayMonthPopup event is a "cancelable" event, // which means that the action to which it corresponds can be // prevented from happening by canceling the event. // // Canceling an event is very simple - just set the 'Cancel' // property of the event arguments to true. The action will then // be prevented from happening, and the corresponding "After" // event will not fire. // If the month for which the popup is being displayed is // not in the current year, we will cancel the event, effectively // diallowing the displaying of the popup. if ( e.Month.Year.YearNumber != DateTime.Today.Year ) e.Cancel = true; }
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