From c5c09275b5f054d8426710a05d2c015e47f466be Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Fri, 11 Nov 2016 20:24:45 +0000 Subject: [PATCH] Items control removes the logical child correctly. --- src/Avalonia.Controls/ItemsControl.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Avalonia.Controls/ItemsControl.cs b/src/Avalonia.Controls/ItemsControl.cs index 922f9f0df6..1c6afa4279 100644 --- a/src/Avalonia.Controls/ItemsControl.cs +++ b/src/Avalonia.Controls/ItemsControl.cs @@ -257,7 +257,7 @@ namespace Avalonia.Controls // when it is removed from the Items collection. if (container?.ContainerControl != container?.Item) { - toRemove.Add(container.ContainerControl); + toRemove.Add((container.ContainerControl as ContentPresenter).Child); } }