Table of Contents

Class GridBase

Namespace
Stride.UI.Panels
Assembly
Stride.UI.dll

Represents the base primitive for all the grid-like controls

[DataContract("GridBase")]
public abstract class GridBase : Panel, IUIElementUpdate, IUIElementChildren, IIdentifiable, IScrollAnchorInfo
Inheritance
object
GridBase
Implements
Derived
Inherited Members
Extension Methods

Fields

ColumnPropertyKey

The key to the Column attached dependency property. This defines the column an item is inserted into.

[DataMemberRange(0, 0)]
[Display(null, "Layout")]
public static readonly PropertyKey<int> ColumnPropertyKey

Field Value

PropertyKey<int>

Remarks

The value is coerced in the range [0, MaxValue].

ColumnSpanPropertyKey

The key to the ColumnSpan attached dependency property. This defines the number of columns an item takes.

[DataMemberRange(1, 0)]
[Display(null, "Layout")]
public static readonly PropertyKey<int> ColumnSpanPropertyKey

Field Value

PropertyKey<int>

Remarks

The value is coerced in the range [1, MaxValue].

LayerPropertyKey

The key to the Layer attached dependency property. This defines the layer an item is inserted into.

[DataMemberRange(0, 0)]
[Display(null, "Layout")]
public static readonly PropertyKey<int> LayerPropertyKey

Field Value

PropertyKey<int>

Remarks

The value is coerced in the range [0, MaxValue].

LayerSpanPropertyKey

The key to the LayerSpan attached dependency property. This defines the number of layers an item takes.

[DataMemberRange(1, 0)]
[Display(null, "Layout")]
public static readonly PropertyKey<int> LayerSpanPropertyKey

Field Value

PropertyKey<int>

Remarks

The value is coerced in the range [1, MaxValue].

RowPropertyKey

The key to the Row attached dependency property. This defines the row an item is inserted into.

[DataMemberRange(0, 0)]
[Display(null, "Layout")]
public static readonly PropertyKey<int> RowPropertyKey

Field Value

PropertyKey<int>

Remarks

The value is coerced in the range [0, MaxValue].

RowSpanPropertyKey

The key to the RowSpan attached dependency property. This defines the number of rows an item takes.

[DataMemberRange(1, 0)]
[Display(null, "Layout")]
public static readonly PropertyKey<int> RowSpanPropertyKey

Field Value

PropertyKey<int>

Remarks

The value is coerced in the range [1, MaxValue].

Properties

ColumnGap

Gets or sets the gap between columns in virtual pixels.

[DataMember]
[Display(null, "Layout")]
public float ColumnGap { get; set; }

Property Value

float

LayerGap

Gets or sets the gap between layers in virtual pixels.

[DataMember]
[Display(null, "Layout")]
public float LayerGap { get; set; }

Property Value

float

RowGap

Gets or sets the gap between rows in virtual pixels.

[DataMember]
[Display(null, "Layout")]
public float RowGap { get; set; }

Property Value

float

Methods

CalculateTotalGapSize(int, int)

Calculates the total gap size for a dimension based on the number of cells.

public float CalculateTotalGapSize(int dimension, int cellCount)

Parameters

dimension int

The dimension (0=Column, 1=Row, 2=Layer)

cellCount int

The number of cells in this dimension

Returns

float

The total gap size

GetElementGridPositions(UIElement)

Get the positions of an element in the grid as an Int3.

protected virtual Int3 GetElementGridPositions(UIElement element)

Parameters

element UIElement

The element from which extract the position values

Returns

Int3

The position of the element

GetElementSpanValues(UIElement)

Get an element span values as an Int3.

protected virtual Int3 GetElementSpanValues(UIElement element)

Parameters

element UIElement

The element from which extract the span values

Returns

Int3

The span values of the element

GetGapForDimension(int)

Gets the gap value for the specified dimension.

protected float GetGapForDimension(int dimension)

Parameters

dimension int

The dimension (0=Column, 1=Row, 2=Layer)

Returns

float

The gap value

GetGaps()

Calculates and returns the spacing gaps between columns, rows, and layers.

protected Vector3 GetGaps()

Returns

Vector3

A Vector3 where the X, Y, and Z components represent the column gap, row gap, and layer gap, respectively.