TableLayoutAutoSized Method |
Creates a table layout with an auto sized control.
Namespace:
Eto.Forms
Assembly:
Eto (in Eto.dll) Version: 2.5.3-dev
Syntax public static TableLayout AutoSized(
Control control,
Nullable<Padding> padding = null,
bool centered = false
)
Public Shared Function AutoSized (
control As Control,
Optional padding As Nullable(Of Padding) = Nothing,
Optional centered As Boolean = false
) As TableLayout
static member AutoSized :
control : Control *
?padding : Nullable<Padding> *
?centered : bool
(* Defaults:
let _padding = defaultArg padding null
let _centered = defaultArg centered false
*)
-> TableLayout
Parameters
- control
- Type: Eto.FormsControl
Control to auto size. - padding (Optional)
- Type: SystemNullablePadding
Padding around the control - centered (Optional)
- Type: SystemBoolean
If set to true center the control, otherwise control is upper left of the container.
Return Value
Type:
TableLayoutThe table layout with the auto sized control.
Remarks
Since controls fill an entire cell, you can use this method to create a layout that will ensure that the
specified control gets its preferred size instead of stretching to fill the container.
By default, extra space will be added to the right and bottom, unless centered is true,
which will add equal space to the top/bottom, and left/right.
See Also