Browse Source

Don't invalidate ItemsRepeater measure on children change.

pull/4814/head
Steven Kirk 6 years ago
parent
commit
ce3c8316b5
  1. 5
      src/Avalonia.Controls/Panel.cs
  2. 5
      src/Avalonia.Controls/Repeater/ItemsRepeater.cs

5
src/Avalonia.Controls/Panel.cs

@ -137,6 +137,11 @@ namespace Avalonia.Controls
throw new NotSupportedException(); throw new NotSupportedException();
} }
InvalidateMeasureOnChildrenChanged();
}
private protected virtual void InvalidateMeasureOnChildrenChanged()
{
InvalidateMeasure(); InvalidateMeasure();
} }

5
src/Avalonia.Controls/Repeater/ItemsRepeater.cs

@ -267,6 +267,11 @@ namespace Avalonia.Controls
return result; return result;
} }
private protected override void InvalidateMeasureOnChildrenChanged()
{
// Don't invalidate measure when children change.
}
protected override Size MeasureOverride(Size availableSize) protected override Size MeasureOverride(Size availableSize)
{ {
if (_isLayoutInProgress) if (_isLayoutInProgress)

Loading…
Cancel
Save