'Declaration Public Sub Scroll( _ ByVal numberOfMonths As Integer _ )
public void Scroll( int numberOfMonths )
The UltraMonthViewMulti offers several method for scrolling the calendar to a particular month. The user can use the scroll buttons (if UltraMonthViewMultiBase.MonthScrollButtonsVisibleResolved property returns true) or using the Infragistics.Win.UltraWinSchedule.MonthViewMulti.UltraMonthPopupControl (if the UltraMonthViewMultiBase.AllowMonthPopup property is set to true). Via code, the control can be scrolled by using the EnsureVisible method, Scroll methods, or by setting the UltraMonthViewMultiBase.FirstMonth property.
The numberOfMonths can be a negative value to scroll to previous months.
Private Sub ScrollByOneYear(ByVal forward As Boolean) ' Get the number of months in a year in the current culture's calendar Dim numberOfMonths As Integer = Me.ultraMonthViewMulti1.CalendarInfo.MonthsOfYear.Count ' If the 'forward' parameter is false, flip the sign for the number of months If (Not forward) Then numberOfMonths *= -1 End If ' Use the Scroll method to scroll by the number of months in a year Me.ultraMonthViewMulti1.Scroll(numberOfMonths) End Sub
private void ScrollByOneYear( bool forward ) { // Get the number of months in a year in the current culture's calendar int numberOfMonths = this.ultraMonthViewMulti1.CalendarInfo.MonthsOfYear.Count; // If the 'forward' parameter is false, flip the sign for the number of months if ( ! forward ) numberOfMonths *= -1; // Use the Scroll method to scroll by the number of months in a year this.ultraMonthViewMulti1.Scroll( numberOfMonths ); }
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