Version

CalculatePreferredSize(ILayoutContainer,Object,Int32) Method

Calculates the minimum size required to layout the items.
Syntax
'Declaration
 
Public Overloads Function CalculatePreferredSize( _
   ByVal container As ILayoutContainer, _
   ByVal containerContext As Object, _
   ByVal maximumExtent As Integer _
) As Size
public Size CalculatePreferredSize( 
   ILayoutContainer container,
   object containerContext,
   int maximumExtent
)

Parameters

container
Object that implements the ILayoutContainer to provide bounds information
containerContext
Context used in calls to the container
maximumExtent
The maximum extent before the items should be considered to wrap. This value will be used to calculate the wrap point even if the WrapItems property is set to false

Return Value

A System.Drawing.Size object representing the preferred size required to layout the items.
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