1
votes

I have a strange problem with a listbox. I added only the listbox and a button which adds items to the listbox. If I click an item in the listbox it seems to have some strange multi selection mode on or something... i recorded a short screen cast, see for your self:

http://www.youtube.com/watch?v=zV4424ipNEA
any ideas whats wrong?

1
Do you hold Ctrl button pressed? :)Snowbear
nope.. but i will reboot and check, maybe something hangs...MilMike
I rebooted without luck.. it's really a strange problem :(MilMike
This should show some codeStayOnTarget

1 Answers

4
votes

That is a known issue, as all those strings are the same the selection gets confused because they all are essentially the same object. If you create two identical strings in .NET it does not necessarily create a new one but may reuse the first instance, i am not an expert on this though.

Either wrap the strings in a class (make them the Content of a ListBoxItem for example) or make sure the values are unique.