Skip to content

Commit

Permalink
chore: Missing invalidation
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 committed Sep 21, 2024
1 parent c8f0062 commit b170da8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Uno.UI/UI/Xaml/MobileLayoutingHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit b170da8

Please sign in to comment.