I'm trying to disable the key navigation in a ListBox
. I can do it successfully with this code below :
private void listClips_PreviewKeyDown(object sender, KeyEventArgs e)
{
e.Handled = true;
}
but I wanna add a keyboard shortcut for my program. It's not working when I set e.Handled = true
.
private void listClips_KeyDown(object sender, KeyEventArgs e)
{
MessageBox.Show("Key Pressed " + e.Key);
}
How can I keep both of them functional?