Skip to content

Class GridItemLayout.Count

Definition

Namespace: StardewUI.Widgets
Assembly: StardewUI.dll

A GridItemLayout specifying the maximum divisions - rows or columns, depending on the grid's Orientation; items will be sized distributed uniformly along that axis.

public record GridItemLayout.Count : StardewUI.Widgets.GridItemLayout, 
    IEquatable<StardewUI.Widgets.GridItemLayout.Count>

Inheritance
ObjectGridItemLayout ⇦ Count

Implements
IEquatable<Count>

Members

Constructors

Name Description
Count(Int32) A GridItemLayout specifying the maximum divisions - rows or columns, depending on the grid's Orientation; items will be sized distributed uniformly along that axis.

Properties

Name Description
EqualityContract (Overrides GridItemLayout.get_EqualityContract())
ItemCount Maximum number of cell divisions along the primary orientation axis.

Methods

Name Description
GetItemCountAndLength(Single, Single) Computes the length (along the grid's PrimaryOrientation axis) of a single item, and the number of items that can fit before wrapping.
(Overrides GridItemLayout.GetItemCountAndLength(Single, Single))

Details

Constructors

Count(int)

A GridItemLayout specifying the maximum divisions - rows or columns, depending on the grid's Orientation; items will be sized distributed uniformly along that axis.

public Count(int ItemCount);
Parameters

ItemCount   Int32
Maximum number of cell divisions along the primary orientation axis.


Properties

EqualityContract

protected System.Type EqualityContract { get; }
Property Value

Type


ItemCount

Maximum number of cell divisions along the primary orientation axis.

public int ItemCount { get; set; }
Property Value

Int32


Methods

GetItemCountAndLength(float, float)

Computes the length (along the grid's PrimaryOrientation axis) of a single item, and the number of items that can fit before wrapping.

public override ValueTuple<System.Single, System.Int32> GetItemCountAndLength(float available, float spacing);
Parameters

available   Single
The length available along the same axis.

spacing   Single
Spacing between items, to adjust count-based layouts.

Returns

ValueTuple<Single, Int32>

The length to apply to each item.