Table of Contents

Class UniformGrid

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

Represents the grid where all the rows and columns have an uniform size.

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

Properties

Columns

Gets or sets the number of columns that the UniformGrid has.

[DataMember]
[DataMemberRange(1, 0)]
[Display(null, "Layout")]
public int Columns { get; set; }

Property Value

int

Remarks

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

Layers

Gets or sets the number of layers that the UniformGrid has.

[DataMember]
[DataMemberRange(1, 0)]
[Display(null, "Layout")]
public int Layers { get; set; }

Property Value

int

Remarks

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

Rows

Gets or sets the number of rows that the UniformGrid has.

[DataMember]
[DataMemberRange(1, 0)]
[Display(null, "Layout")]
public int Rows { get; set; }

Property Value

int

Remarks

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

Methods

ArrangeOverride(Vector3)

When overridden in a derived class, positions possible child elements and determines a size for a UIElement derived class.

protected override Vector3 ArrangeOverride(Vector3 finalSizeWithoutMargins)

Parameters

finalSizeWithoutMargins Vector3

The final area within the parent that this element should use to arrange itself and its children.

Returns

Vector3

The actual size used.

GetElementGridPositionsAsFloat(UIElement)

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

protected Vector3 GetElementGridPositionsAsFloat(UIElement element)

Parameters

element UIElement

The element from which extract the position values

Returns

Vector3

The position of the element

GetElementSpanValuesAsFloat(UIElement)

Get an element span values as an Vector3.

protected Vector3 GetElementSpanValuesAsFloat(UIElement element)

Parameters

element UIElement

The element from which extract the span values

Returns

Vector3

The span values of the element

GetSurroudingAnchorDistances(Orientation, float)

Get the distances to the previous and next anchors in the provided direction and from given position.

public override Vector2 GetSurroudingAnchorDistances(Orientation direction, float position)

Parameters

direction Orientation

The direction in which to anchor

position float

The current scrolling position

Returns

Vector2

The distances to previous and next anchors from to current scroll position

Remarks

The distance contained in the X component of the returned vector is inferior or equal to 0 and the distance contained in the Y component is superior or equal to 0.

MeasureOverride(Vector3)

When overridden in a derived class, measures the size in layout required for possible child elements and determines a size for the UIElement-derived class.

protected override Vector3 MeasureOverride(Vector3 availableSizeWithoutMargins)

Parameters

availableSizeWithoutMargins Vector3

The available size that this element can give to child elements. Infinity can be specified as a value to indicate that the element will size to whatever content is available.

Returns

Vector3

The size desired by the children