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
Object ⇦ GridItemLayout ⇦ 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.
Parameters
ItemCount
Int32
Maximum number of cell divisions along the primary orientation axis.
Properties
EqualityContract
Property Value
ItemCount
Maximum number of cell divisions along the primary orientation axis.
Property Value
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
The length to apply to each item.