I want to change an ItemSource or something when pressing Alt + Tab to how to do this. I tried under the code, but its not working in WPF:
void MainWindow_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Tab && (Keyboard.Modifiers & ModifierKeys.Alt) == ModifierKeys.Alt) { MessageBox.Show("CTRL + TAB trapped"); } }
source share