Skip to content

[Repeater] Port LinedFlowLayout (new layout) #22909

Closed

Description

@MartinZikmund

Scope

Port the entire LinedFlowLayout — the largest single component in the Repeater directory (~9000 lines in WinUI). This is a brand-new layout not yet present in Uno.

WinUI sources to port

  • LinedFlowLayout.h/.cpp (837 + 8119 lines — largest file in the Repeater directory)
  • LinedFlowLayoutItemAspectRatios.h/.cpp (132 + 362 lines)
  • LinedFlowLayoutItemCollectionTransitionProvider.h/.cpp (63 + 395 lines)
  • LinedFlowLayoutItemsInfoRequestedEventArgs.h/.cpp (46 + 134 lines)

Uno files to create

  • src/Uno.UI/UI/Xaml/Controls/Repeater/LinedFlowLayout/LinedFlowLayout.cs
  • src/Uno.UI/UI/Xaml/Controls/Repeater/LinedFlowLayout/LinedFlowLayout.h.mux.cs
  • src/Uno.UI/UI/Xaml/Controls/Repeater/LinedFlowLayout/LinedFlowLayout.mux.cs
  • src/Uno.UI/UI/Xaml/Controls/Repeater/LinedFlowLayout/LinedFlowLayout.Properties.cs
  • src/Uno.UI/UI/Xaml/Controls/Repeater/LinedFlowLayout/LinedFlowLayoutItemAspectRatios.cs
  • src/Uno.UI/UI/Xaml/Controls/Repeater/LinedFlowLayout/LinedFlowLayoutItemCollectionTransitionProvider.cs
  • src/Uno.UI/UI/Xaml/Controls/Repeater/LinedFlowLayout/LinedFlowLayoutItemsInfoRequestedEventArgs.cs

Generated stubs to update

  • Generated/.../LinedFlowLayout.cs
  • Generated/.../LinedFlowLayoutItemCollectionTransitionProvider.cs
  • Generated/.../LinedFlowLayoutItemsInfoRequestedEventArgs.cs
  • Generated/.../LinedFlowLayoutItemsJustification.cs (enum)
  • Generated/.../LinedFlowLayoutItemsStretch.cs (enum)

Key implementation notes

  • Uses ElementManager directly (not FlowLayoutAlgorithm) — has its own measure/arrange algorithm
  • Dual-path algorithm: fast path (aspect ratios from ItemsInfoRequested event) + regular path (measure each item)
  • Overrides CreateDefaultItemTransitionProvider() to return LinedFlowLayoutItemCollectionTransitionProvider
  • Heavily uses context.VisibleRect (20+ call sites)
  • Has frozen item ranges, item locking, weighted aspect ratio tracking in 64-item blocks

API tests to port

  • Full port of LinedFlowLayoutTests.cs (1 test — default property values)
  • New runtime tests for: line height computation, aspect ratio fast/regular path, LockItemToLine(), frozen item ranges, ItemsInfoRequested event

Porting rules

All work must follow .github/agents/winui-porting-agent.md and the /winui-port skill.

Dependencies

Requires all previous steps: #22901, #22902, #22903, #22904, #22905, #22906, #22907, #22908.
Specifically needs: IndexBasedLayoutOrientation (#22901), VisibleRect (#22902), ItemCollectionTransitionProvider (#22904), TransitionManager (#22905), ElementManager updates (#22907).

Risk / Complexity

🟡 Medium risk · Very Large — entirely new code (~9000 lines), but no backward compatibility concerns

Activity

  1. github-actions commented on Jul 26, 2026

    @github-actions
    Contributor

    This issue has had no activity for 120 days. It will be closed in 10 days if there is no further activity. Remove the Stale label or leave a comment to keep it open.

  2. added
    stale
    on Jul 26, 2026
  3. removed
    stale
    on Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions