From 245aa5321a1ea53c36fce8b12a209aa02bae8202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nick=20G=C3=B6tti?= <39217894+ngoetti@users.noreply.github.com> Date: Tue, 25 May 2021 14:01:34 +0200 Subject: [PATCH] Notify Observers if Element changed with Index[] Are there any downsides to this? I needed to make this adjustment so that I could properly bind to elements in the Dictionary. --- .../CoordinationDataStructures/ObservableConcurrentDictionary.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/csharp/parallel/ParallelExtensionsExtras/CoordinationDataStructures/ObservableConcurrentDictionary.cs b/csharp/parallel/ParallelExtensionsExtras/CoordinationDataStructures/ObservableConcurrentDictionary.cs index c151b698a55..6acd96a6fa5 100644 --- a/csharp/parallel/ParallelExtensionsExtras/CoordinationDataStructures/ObservableConcurrentDictionary.cs +++ b/csharp/parallel/ParallelExtensionsExtras/CoordinationDataStructures/ObservableConcurrentDictionary.cs @@ -50,6 +50,7 @@ private void NotifyObserversOfChange() { collectionHandler?.Invoke(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset)); propertyHandler?.Invoke(this, new PropertyChangedEventArgs("Count")); + propertyHandler?.Invoke(this, new PropertyChangedEventArgs("Item[]")); propertyHandler?.Invoke(this, new PropertyChangedEventArgs(nameof(Keys))); propertyHandler?.Invoke(this, new PropertyChangedEventArgs(nameof(Values))); }, null);