Browse Source
Merge branch 'master' into fixes/2821-remove-contentcontrolmixin
pull/2926/head
Steven Kirk
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
0 additions and
13 deletions
-
src/Avalonia.Controls/ItemsControl.cs
|
|
|
@ -302,19 +302,6 @@ namespace Avalonia.Controls |
|
|
|
/// <param name="e">The details of the containers.</param>
|
|
|
|
protected virtual void OnContainersRecycled(ItemContainerEventArgs e) |
|
|
|
{ |
|
|
|
var toRemove = new List<ILogical>(); |
|
|
|
|
|
|
|
foreach (var container in e.Containers) |
|
|
|
{ |
|
|
|
// If the item is its own container, then it will be removed from the logical tree
|
|
|
|
// when it is removed from the Items collection.
|
|
|
|
if (container?.ContainerControl != container?.Item) |
|
|
|
{ |
|
|
|
toRemove.Add(container.ContainerControl); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
LogicalChildren.RemoveAll(toRemove); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|