I have a simple listbox like this:
<
ListBox Name="l"><ListBoxItem>1</ListBoxItem> <ListBoxItem>2</ListBoxItem> <ListBoxItem>3</ListBoxItem> </ListBox>
After the window it is in is loaded the I run the following:
l.SelectedIndex = 1;
l.Focus();
Now visually I can see that the 2nd item is selected. But if I press the down arrow on the keyboard the 1st thing that happens is that the selection jumps up to the 1st item (index 0) not down to the last item. Then after this it will go up and down as expected.
Why does this happen Can I do something to correct it