I have a text box and a list. The list displays the search suggestions for the text field. I want to highlight the first element of the list when the user presses the down arrow when the text box is focused. Similarly, the text box should be focused when the user is the first item in the list and presses the up arrow.
I use the following code for KeyBindings:
<KeyBinding Key="Down" Command="{x:Static local:SearchView.ApplicationShortCutsCommand}" CommandParameter="{x:Static common:SearchViewCommands.MoveToSuggestions}" /> <KeyBinding Key="Up" Command="{x:Static local:SearchView.ApplicationShortCutsCommand}" CommandParameter="{x:Static common:SearchViewCommands.MoveToQuery}" />
Other keys, such as Esc and Enter, work fine, although this file does not work at all (the associated event does not fire).
Any suggestions?
source share