C# Класс Eto.Forms.TableLayout

Наследование: Eto.Forms.Layout
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
Create void
InnerAdd void
InternalRemoveLogicalParent void
InternalSetLogicalParent void
OnDeserialized void
OnDeserialized void
SetCellSize void

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

Add() публичный Метод

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.
Результат void

Add() публичный Метод

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.
Результат void

Add() публичный Метод

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.
Результат void

AutoSized() публичный статический Метод

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.
Результат TableLayout

EndInit() публичный Метод

Ends the initialization when loading from xaml or other code generated scenarios
public EndInit ( ) : void
Результат void

GetColumnScale() публичный Метод

Gets the scale for the specified column.
public GetColumnScale ( int column ) : bool
column int Column to retrieve the scale.
Результат bool

GetRowScale() публичный Метод

Gets the scale for the specified row.
public GetRowScale ( int row ) : bool
row int Row to retrieve the scale.
Результат bool

Horizontal() публичный статический Метод

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
Результат TableLayout

Horizontal() публичный статический Метод

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
Результат TableLayout

HorizontalScaled() публичный статический Метод

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
Результат TableLayout

HorizontalScaled() публичный статический Метод

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
Результат TableLayout

Move() публичный Метод

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.
Результат void

Move() публичный Метод

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.
Результат void

OnLoad() защищенный Метод

Raises the Control.Load event, and recursed to this container's children
protected OnLoad ( EventArgs e ) : void
e System.EventArgs Event arguments
Результат void

OnPreLoad() защищенный Метод

Raises the Control.PreLoad event, and recurses to this container's children
protected OnPreLoad ( EventArgs e ) : void
e System.EventArgs Event arguments
Результат void

Remove() публичный Метод

Remove the specified child control.
public Remove ( Control child ) : void
child Control Child control to remove.
Результат void

SetColumnScale() публичный Метод

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.
Результат void

SetRowScale() публичный Метод

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.
Результат void

TableLayout() публичный Метод

Initializes a new instance of the Eto.Forms.TableLayout class.
public TableLayout ( ) : System
Результат System

TableLayout() публичный Метод

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.
Результат System

TableLayout() публичный Метод

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.
Результат System

TableLayout() публичный Метод

Initializes a new instance of the Eto.Forms.TableLayout class with the specified rows.
public TableLayout ( bool yscale ) : System
yscale bool Scale all rows
Результат System

TableLayout() публичный Метод

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.
Результат System