浏览代码

Items control removes the logical child correctly.

Dan Walmsley 9 年之前
父节点
当前提交
c5c09275b5
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Avalonia.Controls/ItemsControl.cs

+ 1 - 1
src/Avalonia.Controls/ItemsControl.cs

@@ -257,7 +257,7 @@ namespace Avalonia.Controls
                 // when it is removed from the Items collection.
                 // when it is removed from the Items collection.
                 if (container?.ContainerControl != container?.Item)
                 if (container?.ContainerControl != container?.Item)
                 {
                 {
-                    toRemove.Add(container.ContainerControl);
+                    toRemove.Add((container.ContainerControl as ContentPresenter).Child);
                 }
                 }
             }
             }