Click or drag to resize

TableLayoutAutoSized Method

Creates a table layout with an auto sized control.

Namespace:  Eto.Forms
Assembly:  Eto (in Eto.dll) Version: 2.5.3-dev
public static TableLayout AutoSized(
	Control control,
	Nullable<Padding> padding = null,
	bool centered = false


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: TableLayout
The table layout with the auto sized control.
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