'Declaration Public ReadOnly Property VisibleMonths As VisibleMonths
public VisibleMonths VisibleMonths {get;}
Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Imports Infragistics.Win.UltraWinSchedule.MonthViewMulti Private Sub SetupMonthOrientation() ' If there is only one month (or less) visible, the property ' setting is not applicable, so return If (Me.ultraMonthViewMulti1.VisibleMonths.Count <= 1) Then Return ' If there are 6 or more months being displayed, set the orientation ' to DownThenAcross, otherwise to AcrossThenDown If (Me.ultraMonthViewMulti1.VisibleMonths.Count >= 6) Then Me.ultraMonthViewMulti1.MonthOrientation = MonthOrientation.DownThenAcross Else Me.ultraMonthViewMulti1.MonthOrientation = MonthOrientation.AcrossThenDown End If ' Set the MonthPadding to be proportional to the number of ' months being displayed by the control Dim numberOfMonths As Integer = Me.ultraMonthViewMulti1.CalendarInfo.MonthsOfYear.Count If (Me.ultraMonthViewMulti1.VisibleMonths.Count <= numberOfMonths) Then Dim padSize As Integer = numberOfMonths - Me.ultraMonthViewMulti1.VisibleMonths.Count Dim padding As Size = New Size(padSize, padSize) Me.ultraMonthViewMulti1.MonthPadding = padding Else Me.ultraMonthViewMulti1.MonthPadding = New Size(2, 2) End If End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; using Infragistics.Win.UltraWinSchedule.MonthViewMulti; private void SetupMonthOrientation() { // If there is only one month (or less) visible, the property // setting is not applicable, so return if ( this.ultraMonthViewMulti1.VisibleMonths.Count <= 1 ) return; // If there are 6 or more months being displayed, set the orientation // to DownThenAcross, otherwise to AcrossThenDown if ( this.ultraMonthViewMulti1.VisibleMonths.Count >= 6 ) this.ultraMonthViewMulti1.MonthOrientation = MonthOrientation.DownThenAcross; else this.ultraMonthViewMulti1.MonthOrientation = MonthOrientation.AcrossThenDown; // Set the MonthPadding to be proportional to the number of // months being displayed by the control int numberOfMonths = this.ultraMonthViewMulti1.CalendarInfo.MonthsOfYear.Count; if ( this.ultraMonthViewMulti1.VisibleMonths.Count <= numberOfMonths ) { int padSize = numberOfMonths - this.ultraMonthViewMulti1.VisibleMonths.Count; Size padding = new Size( padSize, padSize ); this.ultraMonthViewMulti1.MonthPadding = padding; } else this.ultraMonthViewMulti1.MonthPadding = new Size( 2, 2 ); }
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