I have wpf UserControl containing a combobox and a textbox in a row. Currently the only way to move between the components is to tab between them, but I would like to also be able to switch from the combobox to the textbox using the left and right arrow keys.
It is not as easy as just slapping an eventhandler on the keyup event.
void ComboKeyUp( object sender, KeyEventArgs e )
{
if( e.Key == Key.Right)
{
e.Handled = true;
textbox.Focus();
}
}
...because the combo will change value despite the event being reported as handled.
Is there a way to do this that doesn't simultaneously break the up/down selection of items in the combo box?