From c756dd53ce159144c14cfa182edab72e672699f5 Mon Sep 17 00:00:00 2001 From: Poker Date: Thu, 28 Nov 2024 16:16:40 +0800 Subject: [PATCH] Fix: StaggeredLayout division bug --- components/Primitives/src/StaggeredLayout/StaggeredLayout.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Primitives/src/StaggeredLayout/StaggeredLayout.cs b/components/Primitives/src/StaggeredLayout/StaggeredLayout.cs index 384d0614..3253bd53 100644 --- a/components/Primitives/src/StaggeredLayout/StaggeredLayout.cs +++ b/components/Primitives/src/StaggeredLayout/StaggeredLayout.cs @@ -163,7 +163,7 @@ protected override Size MeasureOverride(VirtualizingLayoutContext context, Size if (ItemsStretch is StaggeredLayoutItemsStretch.None) { columnWidth = double.IsNaN(DesiredColumnWidth) ? availableWidth : Math.Min(DesiredColumnWidth, availableWidth); - numColumns = Math.Max(1, (int)Math.Floor(availableWidth / state.ColumnWidth)); + numColumns = Math.Max(1, (int)Math.Floor(availableWidth / columnWidth)); } else {