-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make VirtualizingStackPanel better handle container size changes (#16168
) * Add a failing test for #15712. * Validate StartU at the start of a measure pass. If any container U size has changed since the last layout pass then `StartU` must be considered unstable as the average container height will have changed. * Correctly position focused element. If the focused element has been moved outside the visible viewport due to a realized container size change, then we need to ensure it's positioned correctly. * We can skip check if StartU is already unstable. * Don't invalidate virt. panels more than necessary. * Add another virt panel test. And revert the expected results for another test to the way they were at the beginning of this PR. * Tweak container size estimation. Use the desired size of _measured_ containers instead of the bounds: a layout pass may not had completed on the containers yet, so the bounds may not be up-to-date. Was easier to move the estimation methods out of `RealizedStackElements` and into `VirtualizingStackPanel` itself in order to do this, and arguably makes more sense.
- Loading branch information
Showing
4 changed files
with
265 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.