Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I'm surprised that the behaviour difference between ListBox and the Windows Explorer has not been taken care of after 4 years across 3 major updates of the .NET framework.</p> <p>I ran in to this problem back in Silverlight 3. I ended up overriding the mouse down and mouse up event handler to fully simulate the Windows Explorer behaviour.</p> <p>I don't have the source code any more but the logic should be:</p> <p><strong>When mouse down</strong></p> <ul> <li>if the target item is not selected, clear existing selection <ul> <li>if Ctrl key is down, add target item to selection</li> <li>if Shift key is down <ul> <li>if there is a previously selected item, add all items between target item and previous item to selection</li> <li>else only add target item to selection</li> </ul></li> </ul></li> <li>if the target item is selected de-select only if Ctrl key is down</li> </ul> <p><strong>When mouse up (on the same item)</strong></p> <ul> <li>if the target item is selected <ul> <li>if Ctrl key is down, remove item from selection</li> <li>if Shift key is down <ul> <li>if there is a previously selected item, remove all items between target item and previous item from selection</li> <li>else only remove target item from selection</li> </ul></li> </ul></li> </ul> <p><strong>However</strong> This should really be Microsoft's job to update the behaviour to be consistent to the operating system and to be more intuitive. I've submitted it as a bug to Microsoft if any body wants to vote for it: <a href="http://connect.microsoft.com/VisualStudio/feedback/details/809192/" rel="nofollow">http://connect.microsoft.com/VisualStudio/feedback/details/809192/</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload