views:

42

answers:

0

I want to disable the possibility to navigate a ListBox with the keyboard. My first thought was to set up a PreviewKeyDown handler like so:

private void ListBox_PreviewKeyDown(object sender, KeyEventArgs e)
{
    e.Handled = // some logic here ...
}

Unfortunately this also stops my CommandBindings which are declared in my main window and have according InputGestures from working.
Is there a way to disable keyboard input for a specific control without interfering with the rest of the application?

Thanks for your time.

Edit:
Just gained the [Tumbleweed] badge for this question.
I am still interested in an answer to this question.