Skip to content

WrapPanel does not reflow items correctly after window resize #2

@Chevalier12

Description

@Chevalier12

Summary

WrapPanel does not reliably reflow items when the available size changes after initial layout.

Current behavior

  • Initial arrangement can appear correct.
  • After resizing the host window narrower or wider, wrap breaks are often stale.
  • Items may stay on previous rows/positions (or overlap nearby elements) instead of repositioning for the new width.

Expected behavior

  • WrapPanel should recompute wrapping immediately whenever available width/height changes.
  • Items should reflow to correct rows/positions for both shrink and grow resize paths.

Reproduction

  1. Open a view using WrapPanel with multiple buttons/items (for example Frame/Page demo action rows before workaround).
  2. Resize the app window significantly narrower, then wider.
  3. Observe item placement does not consistently update to new wrap boundaries.

Notes

  • Temporary workaround in demos has been to use explicit StackPanel row grouping instead of WrapPanel.
  • Root cause likely in measure/arrange interaction where wrap decisions during measure are based on unconstrained width and not invalidated/recomputed on subsequent size changes.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions