From b170da852e7f3461be9bfc3b4422c93c18e44214 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Sat, 21 Sep 2024 13:17:39 +0300 Subject: [PATCH] chore: Missing invalidation --- src/Uno.UI/UI/Xaml/MobileLayoutingHelpers.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Uno.UI/UI/Xaml/MobileLayoutingHelpers.cs b/src/Uno.UI/UI/Xaml/MobileLayoutingHelpers.cs index 4887c1fbf901..0fcefd85650a 100644 --- a/src/Uno.UI/UI/Xaml/MobileLayoutingHelpers.cs +++ b/src/Uno.UI/UI/Xaml/MobileLayoutingHelpers.cs @@ -56,6 +56,8 @@ public static Size MeasureElement(View view, Size availableSize) var desiredSizeFromLayouterElement = layouterElement.Measure(availableSize); LayoutInformation.SetDesiredSize(view, desiredSizeFromLayouterElement); LayoutInformation.SetAvailableSize(view, availableSize); + + view.InvalidateArrangeOnNativeOnly(); return desiredSizeFromLayouterElement; } @@ -171,6 +173,7 @@ public static void ArrangeElement(View view, Rect finalRect) // We workaround this by passing the previous LayoutSlot which is the correct rect that was set during native measure. var workaroundThatManagedArrangeHappensDuringNativeMeasure = view is NativeListViewBase; + view.RequestLayout(); view.Layout((int)physicalRect.Left, (int)physicalRect.Top, (int)physicalRect.Right, (int)physicalRect.Bottom); if (view is ViewGroup viewGroup) {