In WPF, I'd like to set the selected indexes of a System.Windows.Controls.ListBox
I best way I've found so far is to remove all the items from the control, insert the selected, call SelectAll(), then insert the rest, but this solution neither works in my situation nor is very efficient.
So, how do you set items in a Listbox to be selected, programmatically?