C# Class Eto.Forms.TableLayout

Inheritance: Eto.Forms.Layout
Show file Open project: picoe/Eto Class Usage Examples

Private Properties

Property Type Description
Create void
InnerAdd void
InternalRemoveLogicalParent void
InternalSetLogicalParent void
OnDeserialized void
OnDeserialized void
SetCellSize void

Public Methods

Method Description
Add ( Control control, Point location ) : void

Adds a control to the specified location.

If a control already exists in the location, it is replaced. Only one control can exist in a cell.

Add ( Control control, int x, int y ) : void

Adds a control to the specified x & y coordinates.

If a control already exists in the location, it is replaced. Only one control can exist in a cell.

Add ( Control control, int x, int y, bool xscale, bool yscale ) : void

Adds a control to the specified x & y coordinates.

If a control already exists in the location, it is replaced. Only one control can exist in a cell. The xscale and yscale parameters are to easily set the scaling for the current row/column while adding the control.

AutoSized ( Control control, Padding padding = null, bool centered = false ) : TableLayout

Creates a table layout with an 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.

EndInit ( ) : void

Ends the initialization when loading from xaml or other code generated scenarios

GetColumnScale ( int column ) : bool

Gets the scale for the specified column.

GetRowScale ( int row ) : bool

Gets the scale for the specified row.

Horizontal ( ) : TableLayout

Creates a horizontal table layout with the specified cells.

Since table layouts are by default vertical by defining the rows and the cells for each row, it is verbose to create nested tables when you want a horizontal table. E.g. new TableLayout(new TableRow(...)). This method is used to easily create a single row table layout with a horizontal set of cells. E.g. TableLayout.Horizontal(...)

Horizontal ( int spacing ) : TableLayout

Creates a horizontal table layout with the specified cells.

Since table layouts are by default vertical by defining the rows and the cells for each row, it is verbose to create nested tables when you want a horizontal table. E.g. new TableLayout(new TableRow(...)). This method is used to easily create a single row table layout with a horizontal set of cells. E.g. TableLayout.Horizontal(...)

HorizontalScaled ( ) : TableLayout

Creates a horizontal table layout with the specified cells scaled equally.

Since table layouts are by default vertical by defining the rows and the cells for each row, it is verbose to create nested tables when you want a horizontal table. E.g. new TableLayout(new TableRow(...)). This method is used to easily create a single row table layout with a horizontal set of cells. E.g. TableLayout.HorizontalScaled(...) The difference between Horizontal and HorizontalScaled is that this method sets ScaleWidth on each cell.

HorizontalScaled ( int spacing ) : TableLayout

Creates a horizontal table layout with the specified cells scaled equally.

Since table layouts are by default vertical by defining the rows and the cells for each row, it is verbose to create nested tables when you want a horizontal table. E.g. new TableLayout(new TableRow(...)). This method is used to easily create a single row table layout with a horizontal set of cells. E.g. TableLayout.HorizontalScaled(...) The difference between Horizontal and HorizontalScaled is that this method sets ScaleWidth on each cell.

Move ( Control control, Point location ) : void

Move the specified control to a new location.

If a control already exists in the new location, it will be replaced. Only one control can exist in a cell. The old location of the control will have an empty space.

Move ( Control control, int x, int y ) : void

Moves the specified control to the new x and y coordinates.

If a control already exists in the new location, it will be replaced. Only one control can exist in a cell. The old location of the control will have an empty space.

Remove ( Control child ) : void

Remove the specified child control.

SetColumnScale ( int column, bool scale = true ) : void

Sets the scale for the specified column.

SetRowScale ( int row, bool scale = true ) : void

Sets the scale for the specified row.

TableLayout ( ) : System

Initializes a new instance of the Eto.Forms.TableLayout class.

TableLayout ( IEnumerable rows ) : System

Initializes a new instance of the Eto.Forms.TableLayout class with the specified rows.

TableLayout ( Eto.Drawing.Size dimensions ) : System

Initializes a new instance of the Eto.Forms.TableLayout class with the specified dimensions.

TableLayout ( bool yscale ) : System

Initializes a new instance of the Eto.Forms.TableLayout class with the specified rows.

TableLayout ( int columns, int rows ) : System

Initializes a new instance of the Eto.Forms.TableLayout class with the specified number of columns and rows.

Protected Methods

Method Description
OnLoad ( EventArgs e ) : void

Raises the Control.Load event, and recursed to this container's children

OnPreLoad ( EventArgs e ) : void

Raises the Control.PreLoad event, and recurses to this container's children

Private Methods

Method Description
Create ( ) : void
InnerAdd ( Control control, int x, int y ) : void
InternalRemoveLogicalParent ( Control control ) : void
InternalSetLogicalParent ( Control control ) : void
OnDeserialized ( StreamingContext context ) : void
OnDeserialized ( bool direct ) : void
SetCellSize ( Eto.Drawing.Size value, bool createRows ) : void

Method Details

Add() public method

Adds a control to the specified location.
If a control already exists in the location, it is replaced. Only one control can exist in a cell.
public Add ( Control control, Point location ) : void
control Control Control to add.
location Point The location of the control.
return void

Add() public method

Adds a control to the specified x & y coordinates.
If a control already exists in the location, it is replaced. Only one control can exist in a cell.
public Add ( Control control, int x, int y ) : void
control Control Control to add.
x int The x coordinate.
y int The y coordinate.
return void

Add() public method

Adds a control to the specified x & y coordinates.
If a control already exists in the location, it is replaced. Only one control can exist in a cell. The xscale and yscale parameters are to easily set the scaling for the current row/column while adding the control.
public Add ( Control control, int x, int y, bool xscale, bool yscale ) : void
control Control Control to add.
x int The x coordinate.
y int The y coordinate.
xscale bool If set to true xscale.
yscale bool If set to true yscale.
return void

AutoSized() public static method

Creates a table layout with an 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.
public static AutoSized ( Control control, Padding padding = null, bool centered = false ) : TableLayout
control Control Control to auto size.
padding Padding Padding around the control
centered bool If set to true center the control, otherwise control is upper left of the container.
return TableLayout

EndInit() public method

Ends the initialization when loading from xaml or other code generated scenarios
public EndInit ( ) : void
return void

GetColumnScale() public method

Gets the scale for the specified column.
public GetColumnScale ( int column ) : bool
column int Column to retrieve the scale.
return bool

GetRowScale() public method

Gets the scale for the specified row.
public GetRowScale ( int row ) : bool
row int Row to retrieve the scale.
return bool

Horizontal() public static method

Creates a horizontal table layout with the specified cells.
Since table layouts are by default vertical by defining the rows and the cells for each row, it is verbose to create nested tables when you want a horizontal table. E.g. new TableLayout(new TableRow(...)). This method is used to easily create a single row table layout with a horizontal set of cells. E.g. TableLayout.Horizontal(...)
public static Horizontal ( ) : TableLayout
return TableLayout

Horizontal() public static method

Creates a horizontal table layout with the specified cells.
Since table layouts are by default vertical by defining the rows and the cells for each row, it is verbose to create nested tables when you want a horizontal table. E.g. new TableLayout(new TableRow(...)). This method is used to easily create a single row table layout with a horizontal set of cells. E.g. TableLayout.Horizontal(...)
public static Horizontal ( int spacing ) : TableLayout
spacing int Spacing between cells
return TableLayout

HorizontalScaled() public static method

Creates a horizontal table layout with the specified cells scaled equally.
Since table layouts are by default vertical by defining the rows and the cells for each row, it is verbose to create nested tables when you want a horizontal table. E.g. new TableLayout(new TableRow(...)). This method is used to easily create a single row table layout with a horizontal set of cells. E.g. TableLayout.HorizontalScaled(...) The difference between Horizontal and HorizontalScaled is that this method sets ScaleWidth on each cell.
public static HorizontalScaled ( ) : TableLayout
return TableLayout

HorizontalScaled() public static method

Creates a horizontal table layout with the specified cells scaled equally.
Since table layouts are by default vertical by defining the rows and the cells for each row, it is verbose to create nested tables when you want a horizontal table. E.g. new TableLayout(new TableRow(...)). This method is used to easily create a single row table layout with a horizontal set of cells. E.g. TableLayout.HorizontalScaled(...) The difference between Horizontal and HorizontalScaled is that this method sets ScaleWidth on each cell.
public static HorizontalScaled ( int spacing ) : TableLayout
spacing int Spacing between cells
return TableLayout

Move() public method

Move the specified control to a new location.
If a control already exists in the new location, it will be replaced. Only one control can exist in a cell. The old location of the control will have an empty space.
public Move ( Control control, Point location ) : void
control Control Control to move.
location Point New location of the control.
return void

Move() public method

Moves the specified control to the new x and y coordinates.
If a control already exists in the new location, it will be replaced. Only one control can exist in a cell. The old location of the control will have an empty space.
public Move ( Control control, int x, int y ) : void
control Control Control to move.
x int The new x coordinate.
y int The new y coordinate.
return void

OnLoad() protected method

Raises the Control.Load event, and recursed to this container's children
protected OnLoad ( EventArgs e ) : void
e System.EventArgs Event arguments
return void

OnPreLoad() protected method

Raises the Control.PreLoad event, and recurses to this container's children
protected OnPreLoad ( EventArgs e ) : void
e System.EventArgs Event arguments
return void

Remove() public method

Remove the specified child control.
public Remove ( Control child ) : void
child Control Child control to remove.
return void

SetColumnScale() public method

Sets the scale for the specified column.
public SetColumnScale ( int column, bool scale = true ) : void
column int Column to set the scale for.
scale bool If set to true scale, otherwise size to preferred size of controls in the column.
return void

SetRowScale() public method

Sets the scale for the specified row.
public SetRowScale ( int row, bool scale = true ) : void
row int Row to set the scale for.
scale bool If set to true scale, otherwise size to preferred size of controls in the row.
return void

TableLayout() public method

Initializes a new instance of the Eto.Forms.TableLayout class.
public TableLayout ( ) : System
return System

TableLayout() public method

Initializes a new instance of the Eto.Forms.TableLayout class with the specified rows.
public TableLayout ( IEnumerable rows ) : System
rows IEnumerable Rows to populate the table.
return System

TableLayout() public method

Initializes a new instance of the Eto.Forms.TableLayout class with the specified dimensions.
public TableLayout ( Eto.Drawing.Size dimensions ) : System
dimensions Eto.Drawing.Size Dimensions of the table.
return System

TableLayout() public method

Initializes a new instance of the Eto.Forms.TableLayout class with the specified rows.
public TableLayout ( bool yscale ) : System
yscale bool Scale all rows
return System

TableLayout() public method

Initializes a new instance of the Eto.Forms.TableLayout class with the specified number of columns and rows.
public TableLayout ( int columns, int rows ) : System
columns int Number of columns in the table.
rows int Number of rows in the table.
return System