From 9aca3d827c24003106a60da5acbded5810e982c9 Mon Sep 17 00:00:00 2001 From: hacklex Date: Wed, 2 Nov 2022 18:00:05 +0300 Subject: [PATCH] Replaced hard-coded indexer with its actual name This was possibly just overlooked since nobody probably ever changed the name from "Item". --- src/Avalonia.Base/Collections/AvaloniaDictionary.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Avalonia.Base/Collections/AvaloniaDictionary.cs b/src/Avalonia.Base/Collections/AvaloniaDictionary.cs index 750fb263f5..35a391f2cb 100644 --- a/src/Avalonia.Base/Collections/AvaloniaDictionary.cs +++ b/src/Avalonia.Base/Collections/AvaloniaDictionary.cs @@ -81,7 +81,7 @@ namespace Avalonia.Collections if (replace) { - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs($"Item[{key}]")); + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs($"{CommonPropertyNames.IndexerName}[{key}]")); if (CollectionChanged != null) { @@ -148,7 +148,7 @@ namespace Avalonia.Collections { _inner.Remove(key); PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Count))); - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs($"Item[{key}]")); + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs($"{CommonPropertyNames.IndexerName}[{key}]")); if (CollectionChanged != null) { @@ -208,7 +208,7 @@ namespace Avalonia.Collections private void NotifyAdd(TKey key, TValue value) { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Count))); - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs($"Item[{key}]")); + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs($"{CommonPropertyNames.IndexerName}[{key}]")); if (CollectionChanged != null)