-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
ItemCollection should implement IList.Remove() #21046
Copy link
Copy link
Open
Labels
Description
Is your feature request related to a problem? Please describe.
ItemCollection currently only implements all but IList.Remove()
Avalonia/src/Avalonia.Controls/ItemCollection.cs
Lines 87 to 90 in 3edf20b
| int IList.Add(object? value) => Add(value); | |
| void IList.Clear() => Clear(); | |
| void IList.Insert(int index, object? value) => Insert(index, value); | |
| void IList.RemoveAt(int index) => RemoveAt(index); |
If you're working with the ItemCollection, but only have it as a IList reference, you get an error that the collection is read only, even though it might not be because IList.Remove is handled on the ItemsSourceView but immediately throws.
Describe the solution you'd like
class ItemCollection
{
+ void IList.Remove(object value) => Remove(value)
}Describe alternatives you've considered
No response
Additional context
No response
Reactions are currently unavailable