Skip to content

GridContainer

Eduard Gushchin edited this page Jun 22, 2026 · 3 revisions

Home | API by Category | Complete API Index | API Compatibility

Field Value
Full name Electron2D.GridContainer
Namespace Electron2D
Kind class
Category UI and Text

Overview

Arranges direct child controls into rows and columns.

Syntax

public class Electron2D.GridContainer : Electron2D.Container

Remarks

GridContainer measures visible direct child controls in row-major order. Each column takes the largest minimum width found in that column, and each row takes the largest minimum height found in that row.

Thread Safety

This type is not synchronized. Create and mutate it on the main scene thread.

Since

This type is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Container

Members

Member Kind Summary
Columns Property Gets or sets the number of columns used by this grid.
Electron2D.GridContainer() Constructor Initializes a new instance of the Electron2D.GridContainer type.
_GetMinimumSize() Method Gets the minimum size required by this grid container.

Member Details

Columns

Kind: Property

public System.Int32 Columns { get; set; }

Summary

Gets or sets the number of columns used by this grid.

Remarks

Children are assigned to cells in row-major order.

Value

The positive column count. The default is 1.

Exceptions

  • System.ArgumentOutOfRangeException: Thrown when the value is less than or equal to zero.

Thread Safety

This property is not synchronized. Mutate it on the main scene thread.

Since

This property is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Container.QueueSort

Electron2D.GridContainer()

Kind: Constructor

public Electron2D.GridContainer()

Summary

Initializes a new instance of the Electron2D.GridContainer type.

Remarks

The new grid starts with one column.

Thread Safety

This constructor is not synchronized. Call it on the main scene thread.

Since

This constructor is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.GridContainer.Columns

_GetMinimumSize()

Kind: Method

public Electron2D.Vector2 _GetMinimumSize()()

Summary

Gets the minimum size required by this grid container.

Remarks

Horizontal and vertical separation are read from h_separation and v_separation theme constants.

Returns

The minimum size produced by row and column measurements.

Thread Safety

This method is not synchronized. Call it on the main scene thread.

Since

This method is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.GridContainer.Columns

Clone this wiki locally