title: WPF equivalent of LVS_EX_ONECLICKACTIVATE?
body: <p>I've got a WPF application with a <code>ListBox</code> in it. For this list box, I'd like to mimic the behaviour of the users control panel (since Windows Vista) -- that is: you single-click on a list item, and it's the same as double-clicking.</p>
  
  <p>In Win32, I'd do this by turning on the LVS_EX_ONECLICKACTIVATE style.</p>
  
  <p>In WPF, I've attempted to do this by handling the <code>MouseLeftButtonUp</code> event. Unfortunately, and this is odd, it sometimes picks up the wrong item.</p>
  
  <p>For example, if you double-click the title bar (caption) to maximise the window, the second mouse-up occurs over the list box, and the event is raised. Similarly, if an item is partially in view, clicking on it scrolls it into view, but the mouse-up is raised against the item that's <em>now</em> in view, not the one clicked.</p>
  
  <p>Now, again, if this was Win32 (before LVS_EX_ONECLICKACTIVATE), I'd get mouse capture on the mouse down, remember the item, and check that I had capture on mouse up.</p>
  
  <p>But it's not Win32, it's WPF. How do I do single-click activation in a WPF list box?</p>