logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class ListRowLayout

    Solves the horizontal layout of one list row: a leading marker, a title, a run of at-a-glance badges, and a control strip pinned to the right edge.

    Inheritance
    object
    ListRowLayout
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Shared.Layout
    Assembly: Serenity.Shared.dll
    Syntax
    public static class ListRowLayout
    Remarks

    Pure arithmetic over floats, deliberately knowing nothing about any engine's layout system, because the failure this exists to prevent is invisible to every other kind of test. A stretch-width control inside a horizontal group silently takes the whole row and leaves nothing for what follows; the result compiles, runs, passes and simply cannot be seen. Solving the row as numbers makes "nothing overlaps anything, and what does not fit is dropped rather than squeezed" a thing that can be asserted.

    Methods

    Solve(float, float, float, IReadOnlyList<float>, IReadOnlyList<float>, Metrics)

    Divides a row into its slices.

    Declaration
    public static ListRowLayout.Solution Solve(float rowX, float rowWidth, float naturalTitleWidth, IReadOnlyList<float> badgeWidths, IReadOnlyList<float> actionWidths, ListRowLayout.Metrics metrics = null)
    Parameters
    Type Name Description
    float rowX

    Left edge of the row.

    float rowWidth

    How wide the row is.

    float naturalTitleWidth

    The width the title would like, measured by the caller.

    IReadOnlyList<float> badgeWidths

    The width each badge would like, in reading order.

    IReadOnlyList<float> actionWidths

    The width each control needs, in reading order.

    ListRowLayout.Metrics metrics

    How the row is proportioned; defaults are used when null.

    Returns
    Type Description
    ListRowLayout.Solution

    The slices, none of which overlap.

    In this article
    © 2026 Serenity. All Rights Reserved