Browse Source
Ensure VirtualizingStackPanel correct element size estimate and fix #17460 (#17461)
Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
pull/17406/head
BobLd
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
3 additions and
1 deletions
-
src/Avalonia.Controls/VirtualizingStackPanel.cs
|
|
|
@ -2,7 +2,6 @@ |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Collections.Specialized; |
|
|
|
using System.Diagnostics; |
|
|
|
using System.Drawing; |
|
|
|
using System.Linq; |
|
|
|
using Avalonia.Controls.Primitives; |
|
|
|
using Avalonia.Controls.Utils; |
|
|
|
@ -164,6 +163,9 @@ namespace Avalonia.Controls |
|
|
|
_realizedElements ??= new(); |
|
|
|
_measureElements ??= new(); |
|
|
|
|
|
|
|
// We need to set the lastEstimatedElementSizeU before calling CalculateDesiredSize()
|
|
|
|
_ = EstimateElementSizeU(); |
|
|
|
|
|
|
|
// We handle horizontal and vertical layouts here so X and Y are abstracted to:
|
|
|
|
// - Horizontal layouts: U = horizontal, V = vertical
|
|
|
|
// - Vertical layouts: U = vertical, V = horizontal
|
|
|
|
|