Browse Source

fix issue #3155 add/remove grid child runtime works properly

pull/3157/head
Andrey Kunchev 7 years ago
parent
commit
d478572e74
  1. 10
      src/Avalonia.Controls/Grid.cs

10
src/Avalonia.Controls/Grid.cs

@ -6,6 +6,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Diagnostics;
using System.Linq;
using System.Threading;
@ -571,6 +572,15 @@ namespace Avalonia.Controls
return (arrangeSize);
}
/// <summary>
/// <see cref="Panel.ChildrenChanged"/>
/// </summary>
protected override void ChildrenChanged(object sender, NotifyCollectionChangedEventArgs e)
{
CellsStructureDirty = true;
base.ChildrenChanged(sender, e);
}
/// <summary>
/// Invalidates grid caches and makes the grid dirty for measure.
/// </summary>

Loading…
Cancel
Save