diff options
Diffstat (limited to 'Xamarin.Forms.Core/Layout.cs')
-rw-r--r-- | Xamarin.Forms.Core/Layout.cs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Xamarin.Forms.Core/Layout.cs b/Xamarin.Forms.Core/Layout.cs index 537fd971..29565b7c 100644 --- a/Xamarin.Forms.Core/Layout.cs +++ b/Xamarin.Forms.Core/Layout.cs @@ -237,11 +237,6 @@ namespace Xamarin.Forms double w = Math.Max(0, width - Padding.HorizontalThickness); double h = Math.Max(0, height - Padding.VerticalThickness); - var isHeadless = CompressedLayout.GetIsHeadless(this); - var headlessOffset = CompressedLayout.GetHeadlessOffset(this); - for (var i = 0; i < LogicalChildrenInternal.Count; i++) - CompressedLayout.SetHeadlessOffset((VisualElement)LogicalChildrenInternal[i], isHeadless ? new Point(headlessOffset.X + Bounds.X, headlessOffset.Y + Bounds.Y) : new Point()); - LayoutChildren(x, y, w, h); for (var i = 0; i < oldBounds.Length; i++) @@ -250,7 +245,9 @@ namespace Xamarin.Forms Rectangle newBound = ((VisualElement)LogicalChildrenInternal[i]).Bounds; if (oldBound != newBound) { - LayoutChanged?.Invoke(this, EventArgs.Empty); + EventHandler handler = LayoutChanged; + if (handler != null) + handler(this, EventArgs.Empty); return; } } |