From 5a34acac2d4588d8fce104019a99a76cb2c57cee Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Wed, 14 Jun 2017 01:58:58 +0200 Subject: [PATCH] Don't need to do this. We don't need to invalidate newly added controls with the layout manager - this is already handed by the parent control. --- src/Avalonia.Layout/Layoutable.cs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/Avalonia.Layout/Layoutable.cs b/src/Avalonia.Layout/Layoutable.cs index bea62efe50..f594450039 100644 --- a/src/Avalonia.Layout/Layoutable.cs +++ b/src/Avalonia.Layout/Layoutable.cs @@ -620,15 +620,6 @@ namespace Avalonia.Layout base.OnVisualParentChanged(oldParent, newParent); } - protected override void OnAttachedToVisualTreeCore(VisualTreeAttachmentEventArgs e) - { - base.OnAttachedToVisualTreeCore(e); - if(!IsMeasureValid) - (VisualRoot as ILayoutRoot)?.LayoutManager.InvalidateMeasure(this); - else if (!IsArrangeValid) - (VisualRoot as ILayoutRoot)?.LayoutManager.InvalidateArrange(this); - } - /// /// Calls on the control on which a property changed. ///