views:

438

answers:

1

Hi!

I'm developing a program in WPF (VB) that relies on keyboard navigation only.

In my program, I have a listbox that displays up to 20000 items.

What I want is that when the listbox has keyboard focus, and I move to the bottom item that is visible (using ArrowDown), I want the focus to move to the next item outside the listbox. I'm using PgUp and PgDown to scroll the listbox contents, and text search to jump to items.

Is there a way to detect if the focused/selected item is the last/first visible item in the listbox?

If so, I could just use:

ListBox1.MoveFocus(New TraversalRequest(FocusNavigationDirection.Down))
+1  A: 

I'd suggest that you don't do this, the user interface should behave consitesntly with other user interfaces in the operating system.

Your users would be better off if you come up with an alternate user interface that's consistent with how user interfaces behave on your target operating system.

Tom