problem binding ListBox on ObservableCollection<T>

Posted by Fabian on Stack Overflow See other posts from Stack Overflow or by Fabian
Published on 2010-03-16T10:08:51Z Indexed on 2010/03/16 10:16 UTC
Read the original article Hit count: 396

Hello,

I have a strange "problem". Could someone explain me why :

If I have in an ObservableCollection, twice (or more time) an item with the same value, then the selections of those values in the ListBox won't work properly ?

In fact, what the ListBox is doing when I click on an item(Even in single item selection) : It selects the first item from the ObservableCollection collection with a matching value. so in the case if multiple items with same value are in the collection, then only the first one will be selected !

© Stack Overflow or respective owner

Related posts about wpf

Related posts about binding