From 3d26e1d9de65b6807884e9300f02e0ce9a9f7d2c Mon Sep 17 00:00:00 2001 From: neuecc Date: Fri, 13 Sep 2024 00:36:57 +0900 Subject: [PATCH] Fix ObservableDictionary.ToNotifyCollectionChanged #71 --- src/ObservableCollections/SynchronizedViewList.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ObservableCollections/SynchronizedViewList.cs b/src/ObservableCollections/SynchronizedViewList.cs index 7fe5634..d0222d3 100644 --- a/src/ObservableCollections/SynchronizedViewList.cs +++ b/src/ObservableCollections/SynchronizedViewList.cs @@ -1,4 +1,4 @@ -using ObservableCollections.Internal; +using ObservableCollections.Internal; using System; using System.Collections; using System.Collections.Generic; @@ -272,7 +272,10 @@ private void Parent_ViewChanged(in SynchronizedViewChangedEventArgs e) { if (e.NewStartingIndex == -1) { + var index = listView.Count; listView.Add(e.NewItem.View); + OnCollectionChanged(e.WithNewStartingIndex(index)); + return; } else {