title: WPF listbox : problem with selection
body: <p>In my XAML file, I have a ListBox declared like this :</p>
  
  <pre><code>           &lt;ListBox x:Name="lstDeck" Height="280" ItemsSource="{Binding Path=Deck}"  &gt;
                  &lt;ListBox.ItemTemplate&gt;
                      &lt;DataTemplate&gt;
                          &lt;ListBoxItem  Content="{Binding}" /&gt;
                      &lt;/DataTemplate&gt;
                  &lt;/ListBox.ItemTemplate&gt;
              &lt;/ListBox&gt;
  </code></pre>
  
  <p>In my view model, Deck is an ObservableCollection, so that binding directly displays the content of my collection.</p>
  
  <p>But when I have several value that hold the same value (for example "10"  six times),
  the selection in the ListBox has a weird behaviour : it select 2-3 elements instead of the only the one on which I clicked.</p>
  
  <p>Moreover, when I click to another listBoxItem, it doesn't unfocus the previous selected one.</p>
  
  <p>Then it is impossible to see which item is actually selected, and impossible to get the SelectedIndex value.</p>
  
  <p>Has someone an idea?</p>