Struct DropdownWindow
Computes the visible slice of a dropdown list that keeps the selected item in view. Pure value type with no side effects — all rendering state is derived from inputs.
public readonly record struct DropdownWindow : IEquatable<DropdownWindow>
- Implements
- Inherited Members
Constructors
DropdownWindow(int, int)
Computes the visible slice of a dropdown list that keeps the selected item in view. Pure value type with no side effects — all rendering state is derived from inputs.
public DropdownWindow(int StartIndex, int VisibleCount)
Parameters
Properties
StartIndex
public int StartIndex { get; init; }
Property Value
VisibleCount
public int VisibleCount { get; init; }
Property Value
Methods
Compute(int, int, int)
Computes a window of maxVisible items that keeps
selectedIndex in view.
public static DropdownWindow Compute(int totalItems, int maxVisible, int selectedIndex)