Version

SetPreferredSize(Control,Size) Method

Sets the preferred size for the control.
Syntax
'Declaration
 
Public Sub SetPreferredSize( _
   ByVal control As Control, _
   ByVal size As Size _
) 
public void SetPreferredSize( 
   Control control,
   Size size
)

Parameters

control
Control managed by the component
size
New preferred size for the specified control
Remarks

The PreferredSize is used when determining how the layout should be arranged and indicates the preferred size to which the control would like to be sized. If the property has not been set, the value returned will be the current size of the System.Windows.Forms.Control or if the control implements Infragistics.Win.Layout.ILayoutItem, it will be the return value from the control's Infragistics.Win.Layout.ILayoutItem.PreferredSize.

Note: Not all layout managers change the size of the controls whose layout it manages and therefore this property may not affect the layout.

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