I have a weird problem with a ListBox in Wpf, where I have a binding to the ListBox SelectedIndex to a property in the viewModel object.
If the SelectedIndex is less that zero, none of the listbox items are selected. However, if the SelectedIndex is set to a larger number than the actual size of the list, the last item is still selected!
Is there a way to make the listBox not select the last item when the SelectedIndex is set to a higher value than the last items index?
Thanks