Version

GetControlSize(Int32,Int32,DayOfWeekDisplayStyle,ResizeMode,UIElementBorderStyle,UIElementBorderStyle) Method

Returns the size that the control would require to display the specified number of months and columns.
Syntax
'Declaration
 
Public Overloads Function GetControlSize( _
   ByVal columns As Integer, _
   ByVal rows As Integer, _
   ByVal dayOfWeekDisplayStyle As DayOfWeekDisplayStyle, _
   ByVal resizeMode As ResizeMode, _
   ByVal borderStyleControl As Infragistics.Win.UIElementBorderStyle, _
   ByVal borderStyleCalendar As Infragistics.Win.UIElementBorderStyle _
) As Size
public Size GetControlSize( 
   int columns,
   int rows,
   DayOfWeekDisplayStyle dayOfWeekDisplayStyle,
   ResizeMode resizeMode,
   Infragistics.Win.UIElementBorderStyle borderStyleControl,
   Infragistics.Win.UIElementBorderStyle borderStyleCalendar
)

Parameters

columns
Number of rows of months
rows
Number of month columns
dayOfWeekDisplayStyle
DayOfWeekDisplayStyle
resizeMode
ResizeMode
borderStyleControl
Borderstyle for the control
borderStyleCalendar
BorderStyle for the month calendar area

Return Value

Size that the control would require to display the specified number of months and columns.
Example
This example returns whether the control can display the specified number of rows and columns of months at its current size.

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;

		}
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