Version

BeforeScroll Event (UltraMonthViewSingleBase)

Fired before the UltraMonthViewSingle or UltraWeekView control is scrolled
Syntax
'Declaration
 
Public Event BeforeScroll As BeforeScrollEventHandler
public event BeforeScrollEventHandler BeforeScroll
Event Data

The event handler receives an argument of type BeforeScrollEventArgs containing data related to this event. The following BeforeScrollEventArgs properties provide information specific to this event.

PropertyDescription
Cancel (Inherited from System.ComponentModel.CancelEventArgs) 
OwnerScroll Returns whether the scroll action applies to owner scrolling.
ScrollAction Returns the scroll action that was taken
Remarks

The BeforeScroll event is a cancelable event. If the event is canceled, the AfterScroll event does not fire, and the control is not scrolled.

Example
This example cancels the scroll operation if the user is dragging the scroll thumb.

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.

Private Sub UltraMonthViewSingle1_BeforeScroll(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinSchedule.BeforeScrollEventArgs) Handles ultraMonthViewSingle.BeforeScroll

    '----------------------------------------------------------------------------------------------------
    '	Description
    '	BeforeScroll
    '
    '	Fires before the control is scrolled.
    '	If the BeforeScroll event is canceled, the control is not scrolled, and the AfterScroll event does not fire.
    '
    '----------------------------------------------------------------------------------------------------

    If e.ScrollAction = ScrollEventType.ThumbTrack Then e.Cancel = True

End Sub
private void ultraMonthViewSingle1_BeforeScroll(object sender, Infragistics.Win.UltraWinSchedule.BeforeScrollEventArgs e)
{
	//----------------------------------------------------------------------------------------------------
	//	Description
	//	BeforeScroll
	//
	//	Fires before the control is scrolled.
	//	If the BeforeScroll event is canceled, the control is not scrolled, and the AfterScroll event does not fire.
	//
	//----------------------------------------------------------------------------------------------------

	if ( e.ScrollAction == ScrollEventType.ThumbTrack )
		e.Cancel = true;

}
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