I debugged an employee program and ran into this problem in WPF.
It looks like listBoxName.SelectedItems returns a list of selected items in the order in which the user selects the item from the interface. This is a problem because I need to keep the actual order of the elements.
Example:
the list is in Extended selectmode and my list contains something: runfirst, runningecond, runthird
the user is given the opportunity to choose from which they will be launched from the list. They choose runthird and then runfirst. This causes runthird to appear at the top of the list, and then start over. I think I could sort the list before starting foreach, but I was wondering if there is an easier way.
thanks
source share