title: How to get indices of selected items in WPF's listbox?
body: <p>Before you mark this question as a duplicate or suggest using Items.IndexOf, please do the following:</p>
  
  <pre><code>public MainWindow()
  {
      InitializeComponent();
  
      var A = new object();
      var B = new object();
      var C = new object();
  
      lbItems.Items.Add(A);
      lbItems.Items.Add(B);
      lbItems.Items.Add(C);
      lbItems.Items.Add(A);
      lbItems.Items.Add(B);
      lbItems.Items.Add(C);
  }
  
  private void lbItems_MouseDoubleClick(object sender, MouseButtonEventArgs e)
  {
      MessageBox.Show(lbItems.Items.IndexOf(lbItems.SelectedItems[0]).ToString());
  }
  </code></pre>
  
  <p>Then doubleclick fourth element (you'll get 0 instead of 3).</p>
  
  <p>How to get a list of selected item indices?</p>