Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't reject items sources implementing INotifyCollectionChanged and IList<T> but not IList #8788

Closed
Coding-Enthusiast opened this issue Aug 20, 2022 · 2 comments
Labels

Comments

@Coding-Enthusiast
Copy link

ListBox items bound to an object implementing INotifyCollectionChanged and IList<T> throws an exception saying "Collection implements INotifyCollectionChanged by not IList." I believe on this line. This didn't use to happen in 0.10.6.
It looks like only the first two methods of IList are used which also exist in IList<T>.
IList interface:

    object this[int index] { get; set; }
    int IndexOf(object value);
    bool IsFixedSize { get; }
    bool IsReadOnly { get; }
    int Add(object value);
    void Clear();
    bool Contains(object value);
    void Insert(int index, object value);
    void Remove(object value);
    void RemoveAt(int index);

IList<T> interface:

    T this[int index] { get; set; }
    int IndexOf(T item);
    void Insert(int index, T item);
    void RemoveAt(int index);
@rabbitism
Copy link
Contributor

I think this topic is discussed in #8764

@maxkatz6
Copy link
Member

Duplicate of #8764

@maxkatz6 maxkatz6 marked this as a duplicate of #8764 Aug 20, 2022
@maxkatz6 maxkatz6 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants