Browse Source

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.
pull/1014/head
Steven Kirk 9 years ago
parent
commit
5a34acac2d
  1. 9
      src/Avalonia.Layout/Layoutable.cs

9
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);
}
/// <summary>
/// Calls <see cref="InvalidateMeasure"/> on the control on which a property changed.
/// </summary>

Loading…
Cancel
Save