Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Imports Infragistics.Win.UltraWinSchedule.MonthViewMulti Private Function CanDisplayAllMonthsAtCurrentSize(ByVal cols As Integer, ByVal rows As Integer) As Boolean ' Use the GetControlSize method to return the size needed ' to display the specified number of rows and columns of months Dim sizeRequired As Size = Me.ultraMonthViewMulti1.GetControlSize(cols, rows) ' If the size needed is bigger than the current size of the control, return false If (sizeRequired.Width > Me.ultraMonthViewMulti1.Size.Width Or _ sizeRequired.Height > Me.ultraMonthViewMulti1.Size.Height) Then Return False End If Return True End Function
using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; using Infragistics.Win.UltraWinSchedule.MonthViewMulti; private bool CanDisplayAllMonthsAtCurrentSize( int cols, int rows ) { // Use the GetControlSize method to return the size needed // to display the specified number of rows and columns of months Size sizeRequired = this.ultraMonthViewMulti1.GetControlSize( cols, rows ); // If the size needed is bigger than the current size of the control, return false if ( sizeRequired.Width > this.ultraMonthViewMulti1.Size.Width || sizeRequired.Height > this.ultraMonthViewMulti1.Size.Height ) return false; return true; }